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

Impl. study search on Query Page using 'study tags' #4571

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

BasLee
Copy link

@BasLee BasLee commented Apr 4, 2023

This PR allows users to search studies on the index page by their study tags.

The study tags are now fetched in the QueryStore, and added to the study node metadata as a flat string.
To search in study tags, the studyTags metadata property is added to searchNodeFields, so the textQueryUtils includes it when searching.

PR depends on this backend PR that adds studyId to the study tags entity.

Changes

  • Add study tags to study list metadata and to full text search fields
  • Allow full text search not only in study nodes but also their metadata
  • Update API: add study ID to study tags entity
  • Refactorings:
    • Rename DefaultPhrase to more meaningful StringPhrase (vs ListPhrase)
    • Rename defaultNodeFields to searchNodeFields
    • Remove unused searchTerms property from study list metadata

@BasLee BasLee changed the title Search study tags Search studies by their tags Apr 4, 2023
@pvannierop pvannierop changed the title Search studies by their tags Impl. study search on Query Page using 'study tags' Apr 6, 2023
@alisman alisman self-assigned this Apr 17, 2023
allStudyTags.find(
t => t.studyId === (node as CancerStudy).studyId
);
let studyTags = '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ternary would be clearer

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, would be nice if we could do null or undefined instead of empty string

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2009473

@@ -252,3 +264,12 @@ export default class CancerStudyTreeData {
}
}
}

function flattenTags(tags: any): string {
Copy link
Collaborator

@alisman alisman Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stringifyTags?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed in 2009473

@BasLee BasLee requested a review from alisman April 18, 2023 10:53
@alisman alisman merged commit 7651304 into cBioPortal:master Apr 18, 2023
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.

2 participants