generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Description
Related design is presented in issue #182
Todo list
- Support the
multi_matchfunctionality by pushing it down to the search engine - Enable
multi_matchfunction in SQL and PPL syntax and parser, including all the available parameters - Make sure the function in new engine is compatible with the old engine support (including
match_matchandmultimatchfunctions) - Add unit tests. (Unit tests are mandatory for all code changes.)
- Add integration test cases for
multi_match - Update user manual
Function details
The multi_match function maps the multi match query used in the search engine. This query builds on the match query to allow multi-field queries.
Syntax:
multi_match([field_list], query_expression[, option=<option_value>]*)
Available options:
- analyzer
- auto_generate_synonyms_phrase
- boost
- operator
- minimum_should_match
- lenient
- zero_terms_query
- type_breaker
- cutoff_frequency
- type (best_fields, most_fields, cross_fields, phrase, phrase_prefix, bool_prefix)
Sample queries:
# Search query 1
GET my_index/_search
{
"query": {
"multi_match" : {
"query": "this is a test",
"fields": [ "subject", "message" ]
}
}
}
# SQL
SELECT * FROM my_index WHERE multi_match([subject, message], "this is a test")
# PPL
source=my_index | where multi_match([subject, message], "this is a test")
# Search query 2
GET my_index/_search
{
"query": {
"multi_match" : {
"query": "brown fox",
"type": "best_fields",
"fields": [ "subject", "message" ],
"tie_breaker": 0.3
}
}
}
# SQL
SELECT * FROM my_index WHERE multi_match([subject, message], "brown fox", type="best_fields", tie_breaker=0.3)
# PPL
source=my_index | where multi_match([subject, message], "this is a test", type="best_fields", tie_breaker=0.3)
Metadata
Metadata
Assignees
Labels
No labels