From 6856d7c1db73d612f5c7a3763cd00e51227dfdaf Mon Sep 17 00:00:00 2001 From: Kunihiko Kido Date: Wed, 25 Mar 2015 14:54:13 +0900 Subject: [PATCH] fixed search parameter bugs --- elasticsearch.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/elasticsearch.py b/elasticsearch.py index f3eabb5..9e2a1f1 100644 --- a/elasticsearch.py +++ b/elasticsearch.py @@ -491,8 +491,8 @@ def run(self): def on_done(self, analyzer): path = make_path(self.index, '_analyze') body = self.get_selection() - params = DEFAULT_PARAMS - params.update(dict(analyzer=analyzer)) + params = dict(analyzer=analyzer) + params.update(DEFAULT_PARAMS) self.request_post(path, body=body, params=params) @@ -692,8 +692,8 @@ def on_done(self, index): search_type = self.search_types[selected] path = make_path(self.index, self.doc_type, '_search') body = self.get_selection() - params = DEFAULT_PARAMS - params.update(dict(search_type=search_type)) + params = dict(search_type=search_type) + params.update(DEFAULT_PARAMS) self.request_post(path, body=body, params=params) @@ -704,8 +704,8 @@ def run(self): def on_done(self, query): path = make_path(self.index, self.doc_type, '_search') - params = DEFAULT_PARAMS - params.update(dict(q=query)) + params = dict(q=query) + params.update(DEFAULT_PARAMS) self.request_get(path, params=params)