-
Notifications
You must be signed in to change notification settings - Fork 271
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
Conversation
5334c12
to
f022fd9
Compare
5948c3e
to
5a30256
Compare
allStudyTags.find( | ||
t => t.studyId === (node as CancerStudy).studyId | ||
); | ||
let studyTags = ''; |
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.
ternary would be clearer
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.
also, would be nice if we could do null or undefined instead of empty string
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.
Fixed in 2009473
@@ -252,3 +264,12 @@ export default class CancerStudyTreeData { | |||
} | |||
} | |||
} | |||
|
|||
function flattenTags(tags: any): string { |
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.
stringifyTags?
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.
Renamed in 2009473
2009473
to
a36e1ca
Compare
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 tosearchNodeFields
, so the textQueryUtils includes it when searching.PR depends on this backend PR that adds studyId to the study tags entity.
Changes
DefaultPhrase
to more meaningfulStringPhrase
(vsListPhrase
)defaultNodeFields
tosearchNodeFields
searchTerms
property from study list metadata