Add regex operator to Atlas Search#1587
Merged
joykim1005 merged 9 commits intomongodb:mainfrom Jan 16, 2025
Merged
Conversation
katcharov
requested changes
Jan 9, 2025
Collaborator
katcharov
left a comment
There was a problem hiding this comment.
Just a couple of minor nits.
Comment on lines
+92
to
+94
| public RegexSearchOperator allowAnalyzedField(final boolean isAllowed) { | ||
| return newWithAppendedValue("allowAnalyzedField", notNull("isAllowed", isAllowed)); | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| public RegexSearchOperator allowAnalyzedField(final boolean isAllowed) { | |
| return newWithAppendedValue("allowAnalyzedField", notNull("isAllowed", isAllowed)); | |
| } | |
| public RegexSearchOperator allowAnalyzedField(final boolean allowAnalyzedField) { | |
| return newWithAppendedValue("allowAnalyzedField", allowAnalyzedField); | |
| } |
Redundant null check. For naming, a similar method uses the same param name as the method itself:
public SearchOptions returnStoredSource(final boolean returnStoredSource) {
return newAppended("returnStoredSource", new BsonBoolean(returnStoredSource));
}
This can be changed in the interfaces as well.
| /** | ||
| * Creates a new {@link RegexSearchOperator} that uses allowAnalyzedField. | ||
| * | ||
| * @param isAllowed The boolean to run the query against an analyzed field. |
Collaborator
There was a problem hiding this comment.
Suggested change
| * @param isAllowed The boolean to run the query against an analyzed field. | |
| * @param isAllowed Must be set to true if the query is run against an analyzed field. |
katcharov
approved these changes
Jan 13, 2025
katcharov
requested changes
Jan 13, 2025
Contributor
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
JAVA-5726
Description
There are several Atlas Search query operators that are not implemented with first class support in the Java driver. This PR adds the
regexoperator to Atlas Search.Testing
./gradlew checkatlas-search-teston EvergreenSearchOperatorTest