@@ -87,22 +87,22 @@ def destroy_documents(self, engine_id, document_type_id, document_ids=[]):
87
87
88
88
def search (self , engine_id , query , options = {}):
89
89
query_string = {'q' : query }
90
- full_query = dict (list ( query_string . items ()) + list ( options . items ()) )
90
+ full_query = dict (query_string , ** options )
91
91
return self .conn ._get (self .__search_path (engine_id ), data = full_query )
92
92
93
93
def search_document_type (self , engine_id , document_type_id , query , options = {}):
94
94
query_string = {'q' : query }
95
- full_query = dict (list ( query_string . items ()) + list ( options . items ()) )
95
+ full_query = dict (query_string , ** options )
96
96
return self .conn ._get (self .__document_type_search_path (engine_id , document_type_id ), data = full_query )
97
97
98
98
def suggest (self , engine_id , query , options = {}):
99
99
query_string = {'q' : query }
100
- full_query = dict (list ( query_string . items ()) + list ( options . items ()) )
100
+ full_query = dict (query_string , ** options )
101
101
return self .conn ._get (self .__suggest_path (engine_id ), data = full_query )
102
102
103
103
def suggest_document_type (self , engine_id , document_type_id , query , options = {}):
104
104
query_string = {'q' : query }
105
- full_query = dict (list ( query_string . items ()) + list ( options . items ()) )
105
+ full_query = dict (query_string , ** options )
106
106
return self .conn ._get (self .__document_type_suggest_path (engine_id , document_type_id ), data = full_query )
107
107
108
108
def analytics_searches (self , engine_id , start_date = None , end_date = None ):
@@ -144,7 +144,7 @@ def crawl_url(self, engine_id, domain_id, url):
144
144
145
145
def users (self , page = None , per_page = None ):
146
146
params = {'client_id' : self .client_id , 'client_secret' : self .client_secret }
147
- return self .conn ._get (self .__users_path (), dict (list ( params . items ()) + list ( self .__pagination_params (page , per_page ). items () )))
147
+ return self .conn ._get (self .__users_path (), dict (params , ** self .__pagination_params (page , per_page )))
148
148
149
149
def user (self , user_id ):
150
150
params = {'client_id' : self .client_id , 'client_secret' : self .client_secret }
0 commit comments