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

feat(search): add filter for specific entities #7919

Merged
merged 5 commits into from
May 1, 2023
Merged

Conversation

iprentic
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Apr 27, 2023
* @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) {
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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)

Copy link
Collaborator

@RyanHolstien RyanHolstien left a 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.

@iprentic iprentic enabled auto-merge (squash) May 1, 2023 22:31
@iprentic iprentic merged commit 5c1283a into master May 1, 2023
@iprentic iprentic deleted the entityFilter branch May 1, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants