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 newCompoundSearchOperatorby adding to itclausesthat, similarly tomust(Iterable), must all be satisfied.must(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperatorby adding to itclausesthat must all be satisfied.mustNot(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperatorby adding to itclausesthat must all not be satisfied.should(Iterable<? extends SearchOperator> clauses) Creates a newCompoundSearchOperatorby adding to itclausesthat are preferred to be satisfied.
-
Method Details
-
must
Creates a newCompoundSearchOperatorby adding to itclausesthat 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 newCompoundSearchOperatorby adding to itclausesthat 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 newCompoundSearchOperatorby adding to itclausesthat 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 newCompoundSearchOperatorby adding to itclausesthat, 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.
-