-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add queryString operator to Atlas Search #1588
Conversation
* @return The requested {@link SearchOperator}. | ||
* @mongodb.atlas.manual atlas-search/queryString/ queryString operator | ||
*/ | ||
static QueryStringSearchOperator queryString(final SearchPath defaultPath, final String query) { |
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.
I think it should not be possible to write queryString(wildcardPath(...
- though the query supports wildcards, I believe the defaultPath itself does not. Could you confirm?
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.
You're right, will change SearchPath
to FieldSearchPath
to limit defaultPath to use wildcardPath!
* @return The requested `SearchOperator`. | ||
* @see [[https://www.mongodb.com/docs/atlas/atlas-search/queryString/ queryString operator]] | ||
*/ | ||
def queryString(defaultPath: SearchPath, query: String): QueryStringSearchOperator = |
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.
@katcharov Shouldn't we also include the score
parameter? (see example https://www.mongodb.com/docs/atlas/atlas-search/queryString/) or is it added as part of the aggregation pipeline separately?
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.
I left out the score
as a parameter since it's an optional field and instead have it in the interface. All the other search operators also include score
in the interface with overrides!
Ticket
JAVA-5727
Description
There are several Atlas Search query operators that are not implemented with first class support in the Java driver. This PR adds the queryString operator to Atlas Search.
Testing