I have a search operation that works fine in mongo aggregations, but when I try and write it in java (Spring framework) and it appears the operation hasn't been added.
Where I expected it to be:
com.mongodb.client.model.search.SearchOperator
$Search aggregation step (MongoDb):
{
index: "default",
regex: {
query: ".*tes.*",
path: {
wildcard: "*",
},
allowAnalyzedField: true,
},
}
Java code:
Bson bsonSearch = Aggregates.search(
SearchOperator., //No regex operation
SearchOptions.searchOptions()
.index("default")
);
- related to
-
JAVA-4931 Add additional SearchOperator helper methods for the rest of the Atlas Search operators
-
- Closed
-