From f0094cbabeee39815a0ab46178dd10394c3f071b Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Fri, 16 Mar 2012 17:24:26 +0100 Subject: [PATCH] Fixes bug 736488 - Fixed bugs in middleware code for ElasticSearch. --- socorro/external/elasticsearch/report.py | 7 +------ socorro/external/elasticsearch/search.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/socorro/external/elasticsearch/report.py b/socorro/external/elasticsearch/report.py index 2444b065dc..44f35ecaab 100644 --- a/socorro/external/elasticsearch/report.py +++ b/socorro/external/elasticsearch/report.py @@ -35,11 +35,6 @@ def get_list(self, **kwargs): if not isinstance(params["signature"], list): params["signature"] = [params["signature"]] - # If using full days, remove the time part of datetimes - if params["use_full_days"]: - params["from_date"] = params["from_date"].date() - params["to_date"] = params["to_date"].date() - # Get information about the versions versions_service = VersionsInfo(self.context) params["versions_info"] = versions_service.versions_info(params) @@ -48,7 +43,7 @@ def get_list(self, **kwargs): params["terms"] = params["signature"] params["search_mode"] = "is_exactly" - query = self.build_query_from_params(params) + query = self.build_query_from_params(params, self.context) json_query = json.dumps(query) logger.debug("Query the crashes or signatures: %s", json_query) diff --git a/socorro/external/elasticsearch/search.py b/socorro/external/elasticsearch/search.py index 39a8a2aaca..0a15f9418d 100644 --- a/socorro/external/elasticsearch/search.py +++ b/socorro/external/elasticsearch/search.py @@ -33,7 +33,7 @@ def search(self, **kwargs): versions_service = Util(config=self.context) params["versions_info"] = versions_service.versions_info(**params) - query = Search.build_query_from_params(params) + query = Search.build_query_from_params(params, self.context) # For signatures mode, we need to collect more data with facets if params["data_type"] == "signatures":