Skip to content
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

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

mbacon-renci
Copy link
Collaborator

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

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.
@frostyfan109
Copy link
Contributor

frostyfan109 commented Jul 25, 2023

@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 .env file should be changed to localhost

@mbacon-renci
Copy link
Collaborator Author

@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.

"""
query_object = {'query': self._build_concepts_query(query, **kwargs)}
total_items = await self.es.count(
body=json.dumps(query_object),
Copy link
Contributor

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

@mbacon-renci
Copy link
Collaborator Author

Hi @YaphetKG and @frostyfan109 can you please review the updated changes?

@YaphetKG YaphetKG self-requested a review August 1, 2023 18:27
@mbacon-renci mbacon-renci merged commit 9629d5e into develop Aug 2, 2023
@mbacon-renci mbacon-renci deleted the feature/concept_type_backend_search branch August 2, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants