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

fix(search): fix filters for hasX and numValues fields #9729

Merged
merged 5 commits into from
Jan 26, 2024

Conversation

RyanHolstien
Copy link
Collaborator

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

@RyanHolstien RyanHolstien added the platform PR-s that make changes to core parts of the platform label Jan 26, 2024
@RyanHolstien RyanHolstien self-assigned this Jan 26, 2024
@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jan 26, 2024
fieldSet.add(numValuesField);
fieldSpecMap.put(fieldName, fieldSet);
}
if (searchableAnnotation.getHasValuesFieldName().isPresent()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jjoyce0510 and I talked about this method being undesirable since it is creating a mostly empty annotation and an annotation that doesn't really reflect the expectations of the boolean field.

The thought was to create/generate a field map with a simpler value than a full scale annotation object.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, it really only needs a couple of the fields so that makes sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

SearchableAnnotation should directly model the annotation inside the PDL files. That is the charter for that object..

If we need another intermediary abstraction to represent the Actual physical index fields that get minted as a result of a SearchableAnnotation, we should create it. Something like SearchableField or something. It can store a pointer to the origin SearchableAnnotation if required.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's what SearchableFieldSpec already is, we just directly access the annotation object for all the information we use instead of duplicating it.

@RyanHolstien RyanHolstien merged commit 051f570 into datahub-project:master Jan 26, 2024
41 checks passed
@RyanHolstien RyanHolstien deleted the fix/coverHasXFields branch January 26, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform PR-s that make changes to core parts of the platform 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