Package org.opengrok.suggest.query
Class SuggesterFuzzyQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.MultiTermQuery
org.apache.lucene.search.FuzzyQuery
org.opengrok.suggest.query.SuggesterFuzzyQuery
- All Implemented Interfaces:
SuggesterQuery
public class SuggesterFuzzyQuery
extends org.apache.lucene.search.FuzzyQuery
implements SuggesterQuery
Query for possible suggestions of
FuzzyQuery
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
org.apache.lucene.search.MultiTermQuery.RewriteMethod, org.apache.lucene.search.MultiTermQuery.TopTermsBlendedFreqScoringRewrite, org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
-
Field Summary
Fields inherited from class org.apache.lucene.search.FuzzyQuery
defaultMaxEdits, defaultMaxExpansions, defaultPrefixLength, defaultTranspositions
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_BLENDED_REWRITE, CONSTANT_SCORE_BOOLEAN_REWRITE, CONSTANT_SCORE_REWRITE, DOC_VALUES_REWRITE, field, rewriteMethod, SCORING_BOOLEAN_REWRITE
-
Constructor Summary
ConstructorsConstructorDescriptionSuggesterFuzzyQuery
(org.apache.lucene.index.Term term, int maxEdits, int prefixLength) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.index.TermsEnum
getTermsEnumForSuggestions
(org.apache.lucene.index.Terms terms) Returns terms that satisfy this query.int
length()
Length of the query.Methods inherited from class org.apache.lucene.search.FuzzyQuery
defaultRewriteMethod, equals, floatToEdits, getAutomata, getFuzzyAutomaton, getMaxEdits, getPrefixLength, getTerm, getTermsEnum, getTranspositions, hashCode, toString, visit
Methods inherited from class org.apache.lucene.search.MultiTermQuery
getField, getRewriteMethod, getTermsCount, getTermsEnum, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, sameClassAs, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengrok.suggest.query.SuggesterQuery
getField
-
Constructor Details
-
SuggesterFuzzyQuery
public SuggesterFuzzyQuery(org.apache.lucene.index.Term term, int maxEdits, int prefixLength)
-
-
Method Details
-
getTermsEnumForSuggestions
public org.apache.lucene.index.TermsEnum getTermsEnumForSuggestions(org.apache.lucene.index.Terms terms) throws IOException Returns terms that satisfy this query.- Specified by:
getTermsEnumForSuggestions
in interfaceSuggesterQuery
- Parameters:
terms
- terms from which to filter the ones that satisfy this query- Returns:
- terms enum of the terms that satisfy this query
- Throws:
IOException
- if an error occurred
-
length
public int length()Length of the query. Used for determining whether query is longer than specified in configuration.- Specified by:
length
in interfaceSuggesterQuery
- Returns:
- query length
-