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.
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.
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.
@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.
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