Make the search more flexible
This commit is contained in:
@@ -29,9 +29,29 @@ def construct_query(query, fields, results):
|
||||
query = {
|
||||
"size": results,
|
||||
"query": {
|
||||
"multi_match": {
|
||||
"query_string": {
|
||||
"query": query,
|
||||
"fields": fields,
|
||||
# "default_field": "msg",
|
||||
# "type": "best_fields",
|
||||
"fuzziness": "AUTO",
|
||||
"fuzzy_transpositions": True,
|
||||
"fuzzy_max_expansions": 50,
|
||||
"fuzzy_prefix_length": 0,
|
||||
"minimum_should_match": 1,
|
||||
"default_operator": "or",
|
||||
"analyzer": "standard",
|
||||
"lenient": False,
|
||||
"boost": 1,
|
||||
"allow_leading_wildcard": True,
|
||||
"enable_position_increments": False,
|
||||
"phrase_slop": 3,
|
||||
"max_determinized_states": 10000,
|
||||
"time_zone": "-08:00",
|
||||
"quote_field_suffix": "",
|
||||
"quote_analyzer": "standard",
|
||||
"analyze_wildcard": True,
|
||||
"auto_generate_synonyms_phrase_query": True,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user