-
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
feat(search): add filter for specific entities #7919
Conversation
metadata-io/src/main/java/com/linkedin/metadata/search/elasticsearch/query/ESSearchDAO.java
Show resolved
Hide resolved
metadata-io/src/main/java/com/linkedin/metadata/search/elasticsearch/query/ESSearchDAO.java
Outdated
Show resolved
Hide resolved
* @param indexConvention The index convention used to generate the index name for an entity | ||
* @return A filter, with the changes if necessary | ||
*/ | ||
static Filter transformFilterForEntities(Filter filter, @Nonnull IndexConvention indexConvention) { |
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.
Why does this need to be static? Without it being static you don't need to pass in the indexConvention method param
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.
Doesn't need to be, but it seemed easier to test this way...
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.
Got it, yeah you can just new up the ESSearchDAO like is done here: https://github.com/datahub-project/datahub/blob/master/metadata-io/src/test/java/com/linkedin/metadata/ESSampleDataFixture.java#L99
(or convert this to a bean definition and wire it in instead of just the IndexConvention)
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.
Overall the changes look good to me :) just some nitpicks, nothing blocking.
Checklist