Package org.apache.lucene.sandbox.search
Class PhraseWildcardQuery.Builder
java.lang.Object
org.apache.lucene.sandbox.search.PhraseWildcardQuery.Builder
- Enclosing class:
PhraseWildcardQuery
Builds a
PhraseWildcardQuery.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final intprotected final List<PhraseWildcardQuery.PhraseTerm> protected final booleanprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMultiTerm(MultiTermQuery multiTermQuery) Adds a multi-term at the next position in the phrase.Adds a single term at the next position in the phrase.Adds a single term at the next position in the phrase.build()Builds aPhraseWildcardQuery.setSlop(int slop) Sets the phrase slop.
-
Field Details
-
field
-
phraseTerms
-
slop
protected int slop -
maxMultiTermExpansions
protected final int maxMultiTermExpansions -
segmentOptimizationEnabled
protected final boolean segmentOptimizationEnabled
-
-
Constructor Details
-
Builder
- Parameters:
field- The query field.maxMultiTermExpansions- The maximum number of expansions across all multi-terms and across all segments. It counts expansions for each segments individually, that allows optimizations per segment and unused expansions are credited to next segments. This is different fromMultiPhraseQueryandSpanMultiTermQueryWrapperwhich have an expansion limit per multi-term.
-
Builder
- Parameters:
field- The query field.maxMultiTermExpansions- The maximum number of expansions across all multi-terms and across all segments. It counts expansions for each segments individually, that allows optimizations per segment and unused expansions are credited to next segments. This is different fromMultiPhraseQueryandSpanMultiTermQueryWrapperwhich have an expansion limit per multi-term.segmentOptimizationEnabled- Whether to enable the segment optimization which consists in ignoring a segment for further analysis as soon as a term is not present inside it. This optimizes the query execution performance but changes the scoring. The result ranking is preserved.
-
-
Method Details
-
addTerm
Adds a single term at the next position in the phrase. -
addTerm
Adds a single term at the next position in the phrase. -
addMultiTerm
Adds a multi-term at the next position in the phrase. Any of the terms returned by the providedMultiTermQueryenumeration may match (expansion as a disjunction). -
setSlop
Sets the phrase slop. -
build
Builds aPhraseWildcardQuery.
-