Currently I am using atlas search for search use case in my java application. I have gone through the aggregation pipeline functionality provided in the java SDK and found that there isn’t a support for $search operator in the SDK(Aggregates.java) like there is a support for $match, $project and so on. I have done one experiment using java code to create BSON documents with required hierarchy maintained and passed it to aggregation pipeline like coll.aggregate(Arrays.asList(new Document("$search", value))). Using this approach things are working as expected. I just want to know on below things,
- Is this the right/recommended approach to support search functionality using this driver for Atlas Search?
- I even didn’t find the Atlas Search index creation using mongo-java-driver so is there a way to do this using java driver as well?
Do let me know what else information is needed from my end.