Skip to content

Commit

Permalink
Merge pull request mozilla-services#454 from AdrianGaudebert/736488-t…
Browse files Browse the repository at this point in the history
…est-fix-middleware-elasticsearch

Fixes bug 736488 - Fixed bugs in middleware code for ElasticSearch.
  • Loading branch information
adngdb committed Mar 21, 2012
2 parents 5989912 + f0094cb commit ce3bfd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions socorro/external/elasticsearch/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion socorro/external/elasticsearch/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit ce3bfd3

Please sign in to comment.