-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take advantage of Elasticsearch filter context when we can #6111
Take advantage of Elasticsearch filter context when we can #6111
Comments
Notes:
|
QA: Check that search works, again :) Also make sure things like making sure the list of add-ons by an author on the detail page works, correctly showing all other add-ons by this author than the one you're visiting, and also making sure non-public content is not returned by search. |
This seems to be causing some issues on dev - the featured extensions&themes are no longer found. It could be something else but I'm suspecting these changes, so I'll be reverting them to see if that does fix it. |
Reverted in mozilla/addons-server#9979 |
Reverted the revert since it wasn't the cause of the problem, which is tracked in #6177 |
I've verified this on -dev and stage and I didn't find regressions around any of the search related functionalities mentioned. |
Currently, with the exception of the
exclude_addons
parameter, the search API uses abool
query with a list of severalmust
clauses. Elasticsearch supports another type of context,filter
, which can be used to filter documents without applying a score.The filter context clauses can be cached by ES automatically and should lead to better performance. There are quite a number of things where we could use it - basically all our
AddonQueryParam
classes exceptAddonExcludeAddonsQueryParam
which is already amust_not
.Also: it could be useful in
AddonRecommendationView
, which wants only specific guids.The text was updated successfully, but these errors were encountered: