Package org.apache.lucene.sandbox.search
Class PhraseWildcardQuery.SingleTerm
- java.lang.Object
-
- org.apache.lucene.sandbox.search.PhraseWildcardQuery.PhraseTerm
-
- org.apache.lucene.sandbox.search.PhraseWildcardQuery.SingleTerm
-
- Enclosing class:
- PhraseWildcardQuery
protected static class PhraseWildcardQuery.SingleTerm extends PhraseWildcardQuery.PhraseTerm
Phrase term with no expansion.
-
-
Field Summary
Fields Modifier and Type Field Description protected Termterm-
Fields inherited from class org.apache.lucene.sandbox.search.PhraseWildcardQuery.PhraseTerm
termPosition
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSingleTerm(Term term, int termPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcollectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, int remainingMultiTerms, int maxExpansionsForTerm, PhraseWildcardQuery.TermsData termsData)CollectsTermStateandTermStatisticsfor the term (potentially expanded).protected intcollectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, PhraseWildcardQuery.TermsData termsData)CollectsTermStateandTermStatisticsfor the term without expansion.booleanequals(Object o)protected QuerygetQuery()protected booleanhasExpansions()inthashCode()protected voidtoString(StringBuilder builder)
-
-
-
Field Detail
-
term
protected final Term term
-
-
Constructor Detail
-
SingleTerm
protected SingleTerm(Term term, int termPosition)
-
-
Method Detail
-
hasExpansions
protected boolean hasExpansions()
- Specified by:
hasExpansionsin classPhraseWildcardQuery.PhraseTerm
-
getQuery
protected Query getQuery()
- Specified by:
getQueryin classPhraseWildcardQuery.PhraseTerm
-
collectTermData
protected int collectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, PhraseWildcardQuery.TermsData termsData) throws IOException
Description copied from class:PhraseWildcardQuery.PhraseTermCollectsTermStateandTermStatisticsfor the term without expansion. It must be called only ifPhraseWildcardQuery.PhraseTerm.hasExpansions()returns false. Simplified version of#collectTermData(PhraseWildcardQuery, IndexSearcher, List, int, int, TermsData)with less arguments. This method throwsUnsupportedOperationExceptionif not overridden.- Overrides:
collectTermDatain classPhraseWildcardQuery.PhraseTerm- Throws:
IOException
-
collectTermData
protected int collectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, int remainingMultiTerms, int maxExpansionsForTerm, PhraseWildcardQuery.TermsData termsData) throws IOException
Description copied from class:PhraseWildcardQuery.PhraseTermCollectsTermStateandTermStatisticsfor the term (potentially expanded).- Specified by:
collectTermDatain classPhraseWildcardQuery.PhraseTermtermsData-PhraseWildcardQuery.TermsDatato update with the collected terms and stats.- Returns:
- The number of expansions or matches in all segments; or 0 if this term does not match in any segment, in this case the phrase query can immediately stop.
- Throws:
IOException
-
toString
protected void toString(StringBuilder builder)
- Specified by:
toStringin classPhraseWildcardQuery.PhraseTerm
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classPhraseWildcardQuery.PhraseTerm
-
hashCode
public int hashCode()
- Specified by:
hashCodein classPhraseWildcardQuery.PhraseTerm
-
-