Skip to content

Commit

Permalink
Add support for allow_partial_search_results search request paramet…
Browse files Browse the repository at this point in the history
…er (#821)
  • Loading branch information
dmvass authored and fxdgear committed Jul 16, 2018
1 parent dfd9e8d commit 3f2b1b9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions elasticsearch/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,15 @@ def update(self, index, doc_type, id, body=None, params=None):
doc_type, id, '_update'), params=params, body=body)

@query_params('_source', '_source_exclude', '_source_include',
'allow_no_indices', 'analyze_wildcard', 'analyzer',
'batched_reduce_size', 'default_operator', 'df', 'docvalue_fields',
'expand_wildcards', 'explain', 'from_', 'ignore_unavailable', 'lenient',
'max_concurrent_shard_requests', 'pre_filter_shard_size', 'preference',
'q', 'request_cache', 'routing', 'scroll', 'search_type', 'size',
'sort', 'stats', 'stored_fields', 'suggest_field', 'suggest_mode',
'suggest_size', 'suggest_text', 'terminate_after', 'timeout',
'track_scores', 'track_total_hits', 'typed_keys', 'version')
'allow_no_indices', 'allow_partial_search_results', 'analyze_wildcard',
'analyzer', 'batched_reduce_size', 'default_operator', 'df',
'docvalue_fields', 'expand_wildcards', 'explain', 'from_',
'ignore_unavailable', 'lenient', 'max_concurrent_shard_requests',
'pre_filter_shard_size', 'preference', 'q', 'request_cache', 'routing',
'scroll', 'search_type', 'size', 'sort', 'stats', 'stored_fields',
'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text',
'terminate_after', 'timeout', 'track_scores', 'track_total_hits',
'typed_keys', 'version')
def search(self, index=None, doc_type=None, body=None, params=None):
"""
Execute a search query and get back search hits that match the query.
Expand All @@ -574,6 +575,10 @@ def search(self, index=None, doc_type=None, body=None, params=None):
:arg allow_no_indices: Whether to ignore if a wildcard indices
expression resolves into no concrete indices. (This includes `_all`
string or when no indices have been specified)
:arg allow_partial_search_results: Set to false to return an overall
failure if the request would produce partial results. Defaults to
True, which will allow partial results in the case of timeouts or
partial failures
:arg analyze_wildcard: Specify whether wildcard and prefix queries
should be analyzed (default: false)
:arg analyzer: The analyzer to use for the query string
Expand Down

0 comments on commit 3f2b1b9

Please sign in to comment.