- .NET Clients: other versions:
- Introduction
- Installation
- Breaking changes
- API Conventions
- Elasticsearch.Net - Low level client
- NEST - High level client
- Troubleshooting
- Search
- Query DSL
- Full text queries
- Term level queries
- Exists Query Usage
- Fuzzy Date Query Usage
- Fuzzy Numeric Query Usage
- Fuzzy Query Usage
- Ids Query Usage
- Prefix Query Usage
- Date Range Query Usage
- Long Range Query Usage
- Numeric Range Query Usage
- Term Range Query Usage
- Regexp Query Usage
- Term Query Usage
- Terms Set Query Usage
- Terms List Query Usage
- Terms Lookup Query Usage
- Terms Query Usage
- Wildcard Query Usage
- Compound queries
- Joining queries
- Geo queries
- Specialized queries
- Span queries
- NEST specific queries
- Aggregations
- Metric Aggregations
- Average Aggregation Usage
- Boxplot Aggregation Usage
- Cardinality Aggregation Usage
- Extended Stats Aggregation Usage
- Geo Bounds Aggregation Usage
- Geo Centroid Aggregation Usage
- Geo Line Aggregation Usage
- Max Aggregation Usage
- Median Absolute Deviation Aggregation Usage
- Min Aggregation Usage
- Percentile Ranks Aggregation Usage
- Percentiles Aggregation Usage
- Rate Aggregation Usage
- Scripted Metric Aggregation Usage
- Stats Aggregation Usage
- String Stats Aggregation Usage
- Sum Aggregation Usage
- T Test Aggregation Usage
- Top Hits Aggregation Usage
- Top Metrics Aggregation Usage
- Value Count Aggregation Usage
- Weighted Average Aggregation Usage
- Bucket Aggregations
- Adjacency Matrix Usage
- Auto Date Histogram Aggregation Usage
- Children Aggregation Usage
- Composite Aggregation Usage
- Date Histogram Aggregation Usage
- Date Range Aggregation Usage
- Diversified Sampler Aggregation Usage
- Filter Aggregation Usage
- Filters Aggregation Usage
- Geo Distance Aggregation Usage
- Geo Hash Grid Aggregation Usage
- Geo Tile Grid Aggregation Usage
- Global Aggregation Usage
- Histogram Aggregation Usage
- Ip Range Aggregation Usage
- Missing Aggregation Usage
- Multi Terms Aggregation Usage
- Nested Aggregation Usage
- Parent Aggregation Usage
- Range Aggregation Usage
- Rare Terms Aggregation Usage
- Reverse Nested Aggregation Usage
- Sampler Aggregation Usage
- Significant Terms Aggregation Usage
- Significant Text Aggregation Usage
- Terms Aggregation Usage
- Variable Width Histogram Usage
- Pipeline Aggregations
- Average Bucket Aggregation Usage
- Bucket Script Aggregation Usage
- Bucket Selector Aggregation Usage
- Bucket Sort Aggregation Usage
- Cumulative Cardinality Aggregation Usage
- Cumulative Sum Aggregation Usage
- Derivative Aggregation Usage
- Extended Stats Bucket Aggregation Usage
- Max Bucket Aggregation Usage
- Min Bucket Aggregation Usage
- Moving Average Ewma Aggregation Usage
- Moving Average Holt Linear Aggregation Usage
- Moving Average Holt Winters Aggregation Usage
- Moving Average Linear Aggregation Usage
- Moving Average Simple Aggregation Usage
- Moving Function Aggregation Usage
- Moving Percentiles Aggregation Usage
- Normalize Aggregation Usage
- Percentiles Bucket Aggregation Usage
- Serial Differencing Aggregation Usage
- Stats Bucket Aggregation Usage
- Sum Bucket Aggregation Usage
- Matrix Aggregations
- Metric Aggregations
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Multi Match Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Multi Match Usage
editFluent DSL example
editq .MultiMatch(c => c .Fields(f => f.Field(p => p.Description).Field("myOtherField")) .Query("hello world") .Analyzer("standard") .Boost(1.1) .Slop(2) .Fuzziness(Fuzziness.Auto) .PrefixLength(2) .MaxExpansions(2) .Operator(Operator.Or) .MinimumShouldMatch(2) .FuzzyRewrite(MultiTermQueryRewrite.ConstantScoreBoolean) .TieBreaker(1.1) .CutoffFrequency(0.001) .Lenient() .ZeroTermsQuery(ZeroTermsQuery.All) .Name("named_query") .AutoGenerateSynonymsPhraseQuery(false) )
Object Initializer syntax example
editnew MultiMatchQuery { Fields = Field<Project>(p => p.Description).And("myOtherField"), Query = "hello world", Analyzer = "standard", Boost = 1.1, Slop = 2, Fuzziness = Fuzziness.Auto, PrefixLength = 2, MaxExpansions = 2, Operator = Operator.Or, MinimumShouldMatch = 2, FuzzyRewrite = MultiTermQueryRewrite.ConstantScoreBoolean, TieBreaker = 1.1, CutoffFrequency = 0.001, Lenient = true, ZeroTermsQuery = ZeroTermsQuery.All, Name = "named_query", AutoGenerateSynonymsPhraseQuery = false }
Example json output.
{ "multi_match": { "_name": "named_query", "boost": 1.1, "query": "hello world", "analyzer": "standard", "fuzzy_rewrite": "constant_score_boolean", "fuzziness": "AUTO", "cutoff_frequency": 0.001, "prefix_length": 2, "max_expansions": 2, "slop": 2, "lenient": true, "tie_breaker": 1.1, "minimum_should_match": 2, "operator": "or", "fields": [ "description", "myOtherField" ], "zero_terms_query": "all", "auto_generate_synonyms_phrase_query": false } }
Multi match with boost usage
editFluent DSL example
editq .MultiMatch(c => c .Fields(Field<Project>(p => p.Description, 2.2).And("myOtherField^0.3")) .Query("hello world") )
Object Initializer syntax example
editnew MultiMatchQuery { Fields = Field<Project>(p => p.Description, 2.2).And("myOtherField^0.3"), Query = "hello world", }
Example json output.
{ "multi_match": { "query": "hello world", "fields": [ "description^2.2", "myOtherField^0.3" ] } }
Multi match with no fields specified
editStarting with Elasticsearch 6.1.0+, it’s possible to send a Multi Match query without providing any fields.
When no fields are provided the Multi Match query will use the fields defined in the index setting index.query.default_field
(which in turns defaults to *
).
Fluent DSL example
editq .MultiMatch(c => c .Query("hello world") )
Object Initializer syntax example
editnew MultiMatchQuery { Query = "hello world", }
Example json output.
{ "multi_match": { "query": "hello world" } }
On this page
Was this helpful?
Thank you for your feedback.