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(gms/autosuggestion): autosuggestion query not returning the result if the query text has a prefix or suffix '-' on the search field #10512

Merged
merged 6 commits into from
May 31, 2024

Conversation

siladitya2
Copy link
Contributor

@siladitya2 siladitya2 commented May 15, 2024

Issue:
We have found that autosuggestion query not returning the result if an urn or any autosuggestion enabled field (type TEXT) of an entity contains a prefix or suffix '-' with the query text value.

Note: Searching is working fine, issue only with Auto suggestion here.

As an example:
urn1: urn:li:dataset:(urn:li:dataPlatform:s3,databox.arn:aws:s3:::dl-adityas,PROD)

urn2: urn:li:dataset:(urn:li:dataPlatform:s3,databox.arn:aws:s3:::dl-adityas-datalake-3vin0mkuxmps/cv-parsing-export,PROD)

Above urns are not auto suggested when we type adityas in the datahub search bar. (please see below UI screenshot)

Test Result Before fix:

Screenshot 2024-05-21 at 12 45 36

Fix:
we need to search the query string (adityas) here with the below query(urn.delimited):

{
   "multi_match":{
      "query":"adityas",
      "fields":[
         "urn.delimited^1.0"
      ],
      "type":"bool_prefix",
      "operator":"OR",
      "slop":0,
      "prefix_length":0,
      "max_expansions":50,
      "zero_terms_query":"NONE",
      "auto_generate_synonyms_phrase_query":true,
      "fuzzy_transpositions":true,
      "boost":1.0
   }
}

Test Result After fix:

Screenshot 2024-05-15 at 22 35 30

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 community-contribution PR or Issue raised by member(s) of DataHub Community datahub-community-champion PRs authored by DataHub Community Champions labels May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not returning result if urn contains special character '-' fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is inside the special character '-' May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is inside the special character '-' fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is between the special character '-' May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is between the special character '-' fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is in between the special character '-' May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is in between the special character '-' fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is in between the special character '-' of the search field May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not suggesting result if the search text is in between the special character '-' of the search field fix(gms/autosuggestion): autosuggestion query not returning result if the query text is in between of the search field May 15, 2024
@siladitya2 siladitya2 changed the title fix(gms/autosuggestion): autosuggestion query not returning result if the query text is in between of the search field fix(gms/autosuggestion): autosuggestion query not returning the result if the query text has a prefix or suffix '-' on the search field May 15, 2024
Copy link
Contributor

@samblackk samblackk left a comment

Choose a reason for hiding this comment

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

This looks like a simple fix to me. Approving.

@samblackk samblackk added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label May 22, 2024
@samblackk samblackk merged commit 91ab27b into datahub-project:master May 31, 2024
40 of 41 checks passed
sleeperdeep pushed a commit to sleeperdeep/datahub that referenced this pull request Jun 25, 2024
…t if the query text has a prefix or suffix '-' on the search field (datahub-project#10512)

Co-authored-by: si-chakraborty <[email protected]>
yoonhyejin pushed a commit that referenced this pull request Jul 16, 2024
…t if the query text has a prefix or suffix '-' on the search field (#10512)

Co-authored-by: si-chakraborty <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community datahub-community-champion PRs authored by DataHub Community Champions merge-pending-ci A PR that has passed review and should be merged once CI is green. product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants