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(java/ui) Add search suggestions to our search experience #8710

Conversation

chriscollins3456
Copy link
Collaborator

This PR implements requesting for search suggestions on the new virtual _entityName field which is on all of our searchable entities. Right now it's configured by default with everything so it only returns suggestions if there are no results that come back. This can be fine-tuned.

We only actually ask for suggestions though if we pass a new search flag in asking for suggestions. I'm only doing this on our main search page on the frontend.

Caveat: Elasticsearch term suggesters does not take into account filters so it always gives suggestions based on no filters applied. This seems like a real gap for elastic right now and was not something Indy or myself could figure out how to get them to be applied.

We are now returning an optional list of suggestions on searchAcrossEntities which I expect to be used in the UI but not from anyone using our API.

On the frontend, if there are search results and suggestions, render the suggestion on the top left sayng "Did you mean {suggestion}" and clicking it routed them to search for that new query with all filters cleared.

If there are no search results, the design of what we say has changed to suggest clearing filters / selected view and show any suggested text if it exists. If there is no suggested text and no filters/view then we show the old "Explore all" button.

Screenshots:
image

image image image image image

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 product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment labels Aug 24, 2023
Copy link
Contributor

@joshuaeilers joshuaeilers left a comment

Choose a reason for hiding this comment

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

lgtm just need to fix the merge conflict

@chriscollins3456 chriscollins3456 merged commit b6141f5 into datahub-project:master Aug 24, 2023
53 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants