From d646bff410833f36efa5b5435094806642b5a365 Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Fri, 17 Apr 2015 14:54:05 +0200 Subject: [PATCH] Add 'query_cache' parameter option --- Changelog.rst | 1 + elasticsearch/client/__init__.py | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changelog.rst b/Changelog.rst index 3dc897b9..9b72d484 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -6,6 +6,7 @@ Changelog 1.5.0 (dev) ----------- + * Add support for ``query_cache`` parameter when searching * helpers have been made more secure by changing defaults to raise an exception on errors diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 0c28a10e..8f2fa6be 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -426,10 +426,10 @@ class Elasticsearch(object): 'analyze_wildcard', 'analyzer', 'default_operator', 'df', 'explain', 'fields', 'indices_boost', 'lenient', 'allow_no_indices', 'expand_wildcards', 'ignore_unavailable', - 'lowercase_expanded_terms', 'from_', 'preference', 'q', 'routing', - 'scroll', 'search_type', 'size', 'sort', 'source', 'stats', - 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', - 'version') + 'lowercase_expanded_terms', 'from_', 'preference', 'q', 'query_cache', + 'routing', 'scroll', 'search_type', 'size', 'sort', 'source', 'stats', + 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', + 'timeout', '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. @@ -471,6 +471,7 @@ class Elasticsearch(object): :arg preference: Specify the node or shard the operation should be performed on (default: random) :arg q: Query in the Lucene query string syntax + :arg query_cache: Enable or disable caching on a per-query basis :arg routing: A comma-separated list of specific routing values :arg scroll: Specify how long a consistent view of the index should be maintained for scrolled search