-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/concept type backend search #300
Conversation
concept_types dict added to results with types and number of results. types parameter added to API query dict, restricting search results to set of types.
@mbacon-renci Have you done the UI changes for this as well, or will that still need to get done? Also, I don't think the |
@frostyfan109 I have done no UI changes at this point. That will still need to get done. I was reading this ticket as focused on back-end work and just did that. The .env change wasn't supposed to go in there, I must have done a git commit -a when I didn't mean to. I will clear that out and update. |
src/dug/core/async_search.py
Outdated
""" | ||
query_object = {'query': self._build_concepts_query(query, **kwargs)} | ||
total_items = await self.es.count( | ||
body=json.dumps(query_object), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this probably should be a dict instead of json string when sending queries to es. @braswent had some issues when using later versions of elastic search
Hi @YaphetKG and @frostyfan109 can you please review the updated changes? |
This implements server-side concept type filtering. All queries now add a 'concept_types' object entry to the reply JSON object, itself a JSON object that provides concept types that match the query and counts of how many documents match. The request object for the concept search also now accepts an optional 'types' parameter, which can be a list of types. Responses will be limited to concepts that match one of the entries in the list.
Fulfills DUG-58