Skip to content

Commit 40fbb2a

Browse files
alexksikeshonzakral
authored andcommitted
Adds 'include' parameter to mlt
1 parent 756a6ae commit 40fbb2a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

elasticsearch/client/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def count_percolate(self, index, doc_type, id=None, body=None, params=None):
817817
doc_type, id, '_percolate', 'count'), params=params, body=body)
818818
return data
819819

820-
@query_params('boost_terms', 'max_doc_freq', 'max_query_terms',
820+
@query_params('boost_terms', 'include', 'max_doc_freq', 'max_query_terms',
821821
'max_word_length', 'min_doc_freq', 'min_term_freq', 'min_word_length',
822822
'mlt_fields', 'percent_terms_to_match', 'routing', 'search_from',
823823
'search_indices', 'search_query_hint', 'search_scroll', 'search_size',
@@ -833,6 +833,7 @@ def mlt(self, index, doc_type, id, body=None, params=None):
833833
:arg id: The document ID
834834
:arg body: A specific search request definition
835835
:arg boost_terms: The boost factor
836+
:arg include: Whether to include the queried document from the response
836837
:arg max_doc_freq: The word occurrence frequency as count: words with
837838
higher occurrence in the corpus will be ignored
838839
:arg max_query_terms: The maximum query terms to be included in the generated query
@@ -955,7 +956,6 @@ def benchmark(self, index=None, doc_type=None, body=None, params=None):
955956
:arg body: The search definition using the Query DSL
956957
:arg verbose: Specify whether to return verbose statistics about each
957958
iteration (default: false)
958-
959959
"""
960960
_, data = self.transport.perform_request('PUT', _make_path(index,
961961
doc_type, '_bench'), params=params, body=body)
@@ -968,7 +968,6 @@ def abort_benchmark(self, name=None, params=None):
968968
`<http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html>`_
969969
970970
:arg name: A benchmark name
971-
972971
"""
973972
_, data = self.transport.perform_request('POST', _make_path('_bench',
974973
'abort', name), params=params)
@@ -983,9 +982,7 @@ def list_benchmarks(self, index=None, doc_type=None, params=None):
983982
:arg index: A comma-separated list of index names; use `_all` or empty
984983
string to perform the operation on all indices
985984
:arg doc_type: The name of the document type
986-
987985
"""
988986
_, data = self.transport.perform_request('GET', _make_path(index,
989987
doc_type, '_bench'), params=params)
990988
return data
991-

0 commit comments

Comments
 (0)