Skip to content

JAVA-6236 add builder API for facet without operator and clean up search api from beta Reason.SERVER - #2006

Open
strogiyotec wants to merge 11 commits into
mongodb:mainfrom
strogiyotec:JAVA-6236
Open

strogiyotec wants to merge 11 commits into
mongodb:mainfrom
strogiyotec:JAVA-6236

Conversation

@strogiyotec

@strogiyotec strogiyotec commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

JAVA-6236 add builder API for facet without operator
Existing API marks operator as mandatory but latest facet API makes it optional
https://www.mongodb.com/docs/search/query/operators-collectors/facet/
image

Also removed @Beta Reason.SERVER from all classes in model/search except for VectorSearchQuery, TextVectorSearchQuery

@strogiyotec
strogiyotec requested a review from a team as a code owner June 23, 2026 23:37
@strogiyotec
strogiyotec requested a review from rozza June 23, 2026 23:37
@codeowners-service-app

Copy link
Copy Markdown

Assigned vbabanin for team dbx-java because rozza is out of office.

@strogiyotec
strogiyotec removed the request for review from rozza June 23, 2026 23:43
@dariakp
dariakp requested review from stIncMale and removed request for vbabanin June 30, 2026 15:14
Comment thread driver-core/src/main/com/mongodb/client/model/search/SearchCollector.java Outdated
Comment thread driver-core/src/main/com/mongodb/client/model/search/SearchCollector.java Outdated
stIncMale

This comment was marked as resolved.

@strogiyotec strogiyotec changed the title JAVA-6236 add builder API for facet without operator JAVA-6236 add builder API for facet without operator and clean up search api from beta Reason.SERVER Jul 16, 2026
@strogiyotec
strogiyotec requested a review from stIncMale July 16, 2026 05:01
*/
@Beta({Reason.CLIENT, Reason.SERVER})
@Beta(Reason.CLIENT)
static FacetSearchCollector facet(final SearchOperator operator, final Iterable<? extends SearchFacet> facets) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just realized: now that the facet methods here and below are annotated the same way SearchCollector is (@Beta(Reason.CLIENT)), we no longer need this annotation on the methods.

Previously it had to be there because the methods were beta also due to the server (and were annotated @Beta({Reason.CLIENT, Reason.SERVER})), which differed from the reason SearchCollector was beta (@Beta(Reason.CLIENT)).

The same applies to the SearchCollector in Scala.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants