-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Adds startsWith and nstartsWith to Elastic Search #5020
Conversation
src/HotChocolate/ElasticSearch/test/Data.ElasticSearch.Tests/StringPrefixTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frzmohammadali Awesome work! This PR looks already really good :)
A few things i noticed:
- We have a pretty strict 100 characters line length. Can you break the queries when possible?
- Could it be that there are some query snapshots missing or is there something wrong with the test helper?
...cSearch.Tests/__snapshots__/StringPrefixTests.ElasticSearch_AndField_WithNegation_query.snap
Show resolved
Hide resolved
...ch/test/Data.ElasticSearch.Tests/__snapshots__/StringPrefixTests.ElasticSearch_AndField.snap
Show resolved
Hide resolved
...st/Data.ElasticSearch.Tests/__snapshots__/StringPrefixTests.ElasticSearch_MultipleField.snap
Show resolved
Hide resolved
...sticSearch.Tests/__snapshots__/StringPrefixTests.ElasticSearch_MultipleField_OneNegated.snap
Show resolved
Hide resolved
@PascalSenn Thanks a lot for your feedback. I'll take care of the points you mentioned and submit an update soon (this evening hopefully) :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well done ali!
Summary of the changes
Two filter operation handlers has been added for string operations with ElasticSearch:
startsWith
nstartsWith
Elastic search query to be used for these operations is the
PrefixQuery
under term-level type of queries.Tests are available in
StringPrefixTests.cs
file.Feedbacks are more than welcome ;)