[Topcrashers] Pass list of signatures to second query



2 years ago
2 years ago


(Reporter: adrian, Unassigned, Mentored)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [good)



2 years ago
In the new, Super Search based topcrashers app, we make two queries. The first one gets the top signatures for the time period. The second one gets the top signature for the previous time period, in order to compare ranks and numbers and show progression of signatures ranks. 

At the moment, that second query multiplies the facet size by 2 to increase the chances of seeing all the signatures of the first query, but that might still fail if a signature was really low in the previous time period. We can make that better by simply passing the list of signatures from the first query to the second query. 

The file is ./webapp-django/crashstats/topcrashers/views.py - https://github.com/mozilla/socorro/blob/master/webapp-django/crashstats/topcrashers/views.py

The function is ``get_topcrashers_results``. Instead of ``params['_facets_size'] *= 2``, add a ``params['signature']`` and pass it a list of all signatures, each one prefixed with the "is exactly" operator, symbolized by the equal sign "=". For example: 

> print(params['signature'])
> ['=moz::foo', '=my_func()<>']
You need to log in before you can comment on or make changes to this bug.