Package org.apache.lucene.search
Class MultiPhraseQuery.Builder
java.lang.Object
org.apache.lucene.search.MultiPhraseQuery.Builder
- Enclosing class:
- MultiPhraseQuery
A builder for multi-phrase queries
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()
Default constructor.Builder
(MultiPhraseQuery multiPhraseQuery) Copy constructor: this will create a builder that has the same configuration as the provided builder. -
Method Summary
Modifier and TypeMethodDescriptionAdd a single term at the next position in the phrase.Add multiple terms at the next position in the phrase.Allows to specify the relative position of terms within the phrase.build()
Builds aMultiPhraseQuery
.setSlop
(int s) Sets the phrase slop for this query.
-
Constructor Details
-
Builder
public Builder()Default constructor. -
Builder
Copy constructor: this will create a builder that has the same configuration as the provided builder.
-
-
Method Details
-
setSlop
Sets the phrase slop for this query.- See Also:
-
add
Add a single term at the next position in the phrase. -
add
Add multiple terms at the next position in the phrase. Any of the terms may match (a disjunction). The array is not copied or mutated, the caller should consider it immutable subsequent to calling this method. -
add
Allows to specify the relative position of terms within the phrase. The array is not copied or mutated, the caller should consider it immutable subsequent to calling this method. -
build
Builds aMultiPhraseQuery
.
-