[JAVA-4190] Client side builder for operators supported by $search Created: 04/Jun/21  Updated: 31/Mar/23  Resolved: 27/May/22

Status: Closed
Project: Java Driver
Component/s: Builders, Query Operations
Affects Version/s: None
Fix Version/s: 4.7.0

Type: New Feature Priority: Major - P3
Reporter: Nihal Jain Assignee: Valentin Kavalenka
Resolution: Done Votes: 0
Labels: QP-priority, rp-toSched, size-medium
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by JAVA-4188 Query builder for $search Closed
Related
related to JAVA-4315 Add builder for $searchMeta stage Closed
is related to JAVA-4415 Add builder for $search stage Closed
Quarter: FY23Q1, FY23Q2
Backwards Compatibility: Fully Compatible
Documentation Changes: Needed
Documentation Changes Summary:

We will need to document the builder API, similar to docs we have for existing Aggregates builder API.
We also need to update Java examples in the docs, e.g., in https://www.mongodb.com/docs/atlas/atlas-search/autocomplete/#basic-examples.

Please see also the description of DOCSP-21671.


 Description   

I want to add a $search stage to my aggregate pipeline.

Aggregate.java does not have a builder for $search. Should we consider adding it (I could volunteer, looks like a straight forward change)?

Or has it been skipped intentionally as its only supported in Mongo Atlas version?



 Comments   
Comment by Githook User [ 16/Jun/22 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Fix `of` `$search`-related methods that are supposed to produce a BSON element but instead produce a BSON document (#964)

JAVA-4190
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/b0ceebbc304528dde016cc791979602491a3eed8

Comment by Githook User [ 27/May/22 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Add query building API for MongoDB Atlas full-text search (#952)

Java API: `com.mongodb.client.model.search`
Scala API: `org.mongodb.scala.model.search`

JAVA-4415 JAVA-4315 JAVA-4190
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/1812865f234b2d9c9ab27ea760959ded152d51ac

Comment by Nihal Jain [ 08/Jun/21 ]

OK thanks. Let me come back to you with a brief summary of changes I intend to make to ensure we are on the same page.

Comment by Jeffrey Yemin [ 08/Jun/21 ]

Also would't integration tests run on some mongodb jenkin environment?

We use an internal CI server, so we would have to configure it to run against an Atlas cluster

If this is not already part of a planned release, may be I can give it a shot?

We will probably target a fall release for this. Yes, you can give it a shot if you'd like.

Comment by Nihal Jain [ 08/Jun/21 ]

Yes I have been playing around with various search operators lately and am familiar with most them now. I think I can do this, only may be not as fast.

Also would't integration tests run on some mongodb jenkin environment?

If this is not already part of a planned release, may be I can give it a shot?

Comment by Jeffrey Yemin [ 08/Jun/21 ]

Hi nihaljain.cs@gmail.com

Thanks for the offer. We do accept pull requests. Just be aware that this one has quite a large API surface due to the variety of search options, so there will be a lot of Javadoc, and tests, required. There is also the issue of how to test it, since any integration tests will have to run against an actual Atlas cluster.

Comment by Nihal Jain [ 08/Jun/21 ]

Hi I could work on this and make a contribution. Let me know if that works.

Thanks.

Comment by Jeffrey Yemin [ 08/Jun/21 ]

Hi nihaljain.cs@gmail.com

We're aware of this and are considering it for an upcoming release.

Regards,
Jeff

CC rachelle.palmer

Comment by Nihal Jain [ 04/Jun/21 ]

Apparently I don't have modify description option.

This Jira is to add a client side utility class to create/build filters for atlas search similar to com.mongodb.client.model.Filters

Generated at Thu Feb 08 09:01:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.