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: add 'CONTAIN' support in query builder #117

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

yangyangv2
Copy link
Contributor

This fix to address the issue #114

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)

@keremsahin1
Copy link
Member

There seems to be something off here. Why do I see diff from @kaliang1 in this PR?

@yangyangv2 yangyangv2 force-pushed the fix-missing-contain-filter branch 3 times, most recently from 045cfe2 to 6de161d Compare July 22, 2021 23:21
This fix to address the issue #114
@yangyangv2 yangyangv2 force-pushed the fix-missing-contain-filter branch from 6de161d to 200ebfe Compare July 27, 2021 19:03
Copy link
Contributor

@camelliazhang camelliazhang left a comment

Choose a reason for hiding this comment

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

also, the current query template supports advanced query as well, so that user can just issue *text? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

@yangyangv2
Copy link
Contributor Author

yangyangv2 commented Jul 27, 2021

also, the current query template supports advanced query as well, so that user can just issue *text? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

Good to know! It could be good for advance users.

This specific ask is for supporting CONTAIN with sbustring query, we prefer to have explicit filter options (CONTAIN, START_WITH, END_WITH) to users and hide ES internal details such as ''. If users knows they are looking for START_WITH, then using START_WITH will perform better as the underlying query pattern is _wildcard_query(term)_.

Exposing * to users may lead to complexity and out of controlled use cases such as searching on "ABCD*"..etc.

@yangyangv2
Copy link
Contributor Author

also, the current query template supports advanced query as well, so that user can just issue *text? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

@yangyangv2 yangyangv2 closed this Jul 27, 2021
@yangyangv2 yangyangv2 reopened this Jul 28, 2021
@keremsahin1 keremsahin1 merged commit 137316a into master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants