-
Notifications
You must be signed in to change notification settings - Fork 25
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
support filter query parameter #296
Comments
Note that we currently used |
We already have a similar implementation in one of API instance: https://github.com/NIAID-Data-Ecosystem/nde-discovery-api/blob/08dfae752613b45647f8ce83350466733ea1e6e6/nde-web/pipeline.py#L64 (called |
Also want to note that this is related to |
RE: #296 filter no longer an alias for fields param
Difference between
query
andfilter
context in an ES query:https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html
The query placed in the
filter
context can be faster than in the normalquery
context (e.g. passed toq
query parameter):filter
query does not included in the_score
calculationfilter
query can be cached by ESWhen implemented, we can change this API query:
?q=object.umls:C0872079 AND pmid_count:>5 AND predicate:LOCATION_OF
to
?q=object.umls:C0872079&filter=pmid_count:>5 AND predicate:LOCATION_OF
They should return the same list of hits, but it would be preferred if the part of
filter
query is used repetitively while theq
query changes.The text was updated successfully, but these errors were encountered: