Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

Commit 6dd2dd4

Browse files
committed
Support for all kwargs on full text queries.
1 parent 55d9bf8 commit 6dd2dd4

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

elasticquery/queries.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,45 @@
1616
'match': {
1717
'field': True,
1818
'args': ('query',),
19-
'kwargs': ('operator', 'zero_terms_query', 'cutoff_frequency', 'boost')
19+
'kwargs': (
20+
'operator', 'zero_terms_query', 'cutoff_frequency', 'boost', 'rewrite',
21+
'prefix_length', 'fuzziness', 'minimum_should_match', 'analyzer',
22+
'max_expansions'
23+
)
2024
},
2125
'multi_match': {
22-
'args': ({'fields': []}, 'query')
26+
'args': ({'fields': []}, 'query'),
27+
'kwargs': (
28+
'operator', 'zero_terms_query', 'cutoff_frequency', 'boost', 'rewrite',
29+
'prefix_length', 'fuzziness', 'minimum_should_match', 'analyzer',
30+
'max_expansions'
31+
)
2332
},
2433
'common': {
2534
'args': ('query',),
35+
'kwargs': (
36+
'minimum_should_match', 'high_freq', 'low_freq', 'high_freq_operator',
37+
'low_freq_operator', 'cutoff_frequency'
38+
),
2639
'process': lambda q: {'body': q}
2740
},
2841
'query_string': {
2942
'args': ('query',),
30-
'kwargs': ({'fields': []},)
43+
'kwargs': (
44+
{'fields': []}, 'default_field', 'default_operator', 'analyzer',
45+
'allow_leading_wildcard', 'lowercase_expanded_terms',
46+
'enable_position_increments', 'fuzzy_max_expansions', 'fuzziness',
47+
'fuzzy_prefix_length', 'phrase_slop', 'boost', 'analyze_wildcard',
48+
'auto_generate_phrase_queries', 'max_determinized_states',
49+
'minimum_should_match', 'lenient', 'locale', 'time_zone'
50+
)
3151
},
3252
'simple_query_string': {
3353
'args': ('query',),
34-
'kwargs': ({'fields': []},)
54+
'kwargs': (
55+
{'fields': []}, 'default_operator', 'analyzer', 'flags', 'locale', 'lenient',
56+
'lowercase_expanded_terms', 'analyze_wildcard', 'minimum_should_match'
57+
)
3558
},
3659

3760
# Term level queries

tests/queries/match.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"args": ["field", "match_value"],
33
"kwargs": {
4-
"boost": 1.2
4+
"boost": 1.2,
5+
"fuzziness": "AUTO",
6+
"minimum_should_match": 1
57
},
68
"output": {
79
"match": {
810
"field": {
911
"query": "match_value",
10-
"boost": 1.2
12+
"boost": 1.2,
13+
"fuzziness": "AUTO",
14+
"minimum_should_match": 1
1115
}
1216
}
1317
}

0 commit comments

Comments
 (0)