Package com.mongodb.client.model.search
Interface CompoundSearchOperatorBase
- All Known Subinterfaces:
CompoundSearchOperator
,FilterCompoundSearchOperator
,MustCompoundSearchOperator
,MustNotCompoundSearchOperator
,ShouldCompoundSearchOperator
A base for a
CompoundSearchOperator
which allows creating instances of this operator.
This interface is a technicality and does not represent a meaningful element of the full-text search query syntax.- Since:
- 4.7
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfilter
(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperator
by adding to itclauses
that, similarly tomust(Iterable)
, must all be satisfied.must
(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperator
by adding to itclauses
that must all be satisfied.mustNot
(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperator
by adding to itclauses
that must all not be satisfied.should
(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperator
by adding to itclauses
that are preferred to be satisfied.
-
Method Details
-
must
Creates a newCompoundSearchOperator
by adding to itclauses
that must all be satisfied.This method may be called multiple times.
- Parameters:
clauses
- The non-empty clauses to add.- Returns:
- A new
CompoundSearchOperator
.
-
mustNot
Creates a newCompoundSearchOperator
by adding to itclauses
that must all not be satisfied.This method may be called multiple times.
- Parameters:
clauses
- The non-empty clauses to add.- Returns:
- A new
CompoundSearchOperator
.
-
should
Creates a newCompoundSearchOperator
by adding to itclauses
that are preferred to be satisfied.This method may be called multiple times.
- Parameters:
clauses
- The non-empty clauses to add.- Returns:
- A new
CompoundSearchOperator
.
-
filter
Creates a newCompoundSearchOperator
by adding to itclauses
that, similarly tomust(Iterable)
, must all be satisfied. The difference is that this method does not affect the relevance score.This method may be called multiple times.
- Parameters:
clauses
- The non-empty clauses to add.- Returns:
- A new
CompoundSearchOperator
.
-