-
Notifications
You must be signed in to change notification settings - Fork 3k
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
refactor(ui): Refactor the Glossary Related Entities, Tag Profiles to use search filters instead of query API. #6352
refactor(ui): Refactor the Glossary Related Entities, Tag Profiles to use search filters instead of query API. #6352
Conversation
4d8fa0a
to
2e94fe8
Compare
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.
Just a couple of comments! otherwise looks good - thanks for dealing with this
// responds. | ||
export const removeFixedFiltersFromFacets = (fixedFilters: FilterSet, facets: FacetMetadata[]) => { | ||
const fixedFields = fixedFilters.filters.map((filter) => filter.field); | ||
return facets.filter((facet) => !(fixedFields.indexOf(facet.field) > -1)); |
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.
definitely a nit and not expecting you to change this - but could use .includes
here as I think that's more readable (facets.filter(facet => !fixedFields.includes(facet.field))
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.
thank you!
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.
wonderful
….com/jjoyce0510/datahub-1 into jj--fix-related-entities-tab-filters
… use search filters instead of query API. (datahub-project#6352)
… use search filters instead of query API. (datahub-project#6352)
… use search filters instead of query API. (datahub-project#6352)
… use search filters instead of query API. (datahub-project#6352)
Summary
In this PR we remove dependency on the search query string for looking up entities related to a given glossary term or tag. This makes the result set much more reliable, as previously special characters in the URN of a glossary or tag URN could cause failures to match at the indexing layer (do to how we tokenize the urn). This fixes those issues.
Status
Ready to Review. Working on some final cypress tests to cover this.
Checklist