Package org.opengrok.suggest.query
Class SuggesterWildcardQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.MultiTermQuery
org.apache.lucene.search.AutomatonQuery
org.apache.lucene.search.WildcardQuery
org.opengrok.suggest.query.SuggesterWildcardQuery
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
,SuggesterQuery
public class SuggesterWildcardQuery
extends org.apache.lucene.search.WildcardQuery
implements SuggesterQuery
Query for possible suggestions of
WildcardQuery
.-
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.WildcardQuery
WILDCARD_CHAR, WILDCARD_ESCAPE, WILDCARD_STRING
Fields inherited from class org.apache.lucene.search.AutomatonQuery
automaton, automatonIsBinary, compiled, term
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
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
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.WildcardQuery
getTerm, toAutomaton, toString
Methods inherited from class org.apache.lucene.search.AutomatonQuery
equals, getAutomaton, getTermsEnum, hashCode, isAutomatonBinary, ramBytesUsed, 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.apache.lucene.util.Accountable
getChildResources
Methods inherited from interface org.opengrok.suggest.query.SuggesterQuery
getField
-
Constructor Details
-
SuggesterWildcardQuery
public SuggesterWildcardQuery(org.apache.lucene.index.Term term) - Parameters:
term
- term with wildcard symbols
-
-
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
-