|
|
addClause
protected void addClause(
Vector clauses,
int conj,
int mods,
Query q
)
No description available for this method.
Clause
public final Query Clause(
String field
)
throws
ParseException
No description available for this method.
Conjunction
public final int Conjunction(
)
throws
ParseException
No description available for this method.
disable_tracing
public final void disable_tracing(
)
No description available for this method.
enable_tracing
public final void enable_tracing(
)
No description available for this method.
generateParseException
public ParseException generateParseException(
)
No description available for this method.
getAnalyzer
public Analyzer getAnalyzer(
)
No description available for this method.
getBooleanQuery
protected Query getBooleanQuery(
Vector clauses
)
throws
ParseException
Factory method for generating query, given a set of clauses.
By default creates a boolean query composed of clauses passed in.
Can be overridden by extending classes, to modify query being
returned.
getField
public String getField(
)
No description available for this method.
getFieldQuery
protected Query getFieldQuery(
String field,
Analyzer analyzer,
String queryText
)
throws
ParseException
Note that parameter analyzer is ignored. Calls inside the parser always
use class member analyser. This method will be deprecated and substituted
by getFieldQuery(String,String) in future versions of Lucene.
Currently overwriting either of these methods works.
getFieldQuery
protected Query getFieldQuery(
String field,
Analyzer analyzer,
String queryText,
int slop
)
throws
ParseException
Base implementation delegates to getFieldQuery(String,Analyzer,String).
This method may be overwritten, for example, to return
a SpanNearQuery instead of a PhraseQuery.
Note that parameter analyzer is ignored. Calls inside the parser always
use class member analyser. This method will be deprecated and substituted
by getFieldQuery(String,String,int) in future versions of Lucene.
Currently overwriting either of these methods works.
getFieldQuery
protected Query getFieldQuery(
String field,
String queryText
)
throws
ParseException
No description available for this method.
getFieldQuery
protected Query getFieldQuery(
String field,
String queryText,
int slop
)
throws
ParseException
Base implementation delegates to getFieldQuery(String,String).
This method may be overridden, for example, to return
a SpanNearQuery instead of a PhraseQuery.
getFuzzyMinSim
public float getFuzzyMinSim(
)
Get the default minimal similarity for fuzzy queries.
getFuzzyQuery
protected Query getFuzzyQuery(
String field,
String termStr
)
throws
ParseException
Factory method for generating a query (similar to
(getWildcardQuery). Called when parser parses
an input term token that has the fuzzy suffix (~) appended.
getFuzzyQuery
protected Query getFuzzyQuery(
String field,
String termStr,
float minSimilarity
)
throws
ParseException
Factory method for generating a query (similar to
(getWildcardQuery). Called when parser parses
an input term token that has the fuzzy suffix (~floatNumber) appended.
getLocale
public Locale getLocale(
)
Returns current locale, allowing access by subclasses.
getLowercaseWildcardTerms
public boolean getLowercaseWildcardTerms(
)
No description available for this method.
getNextToken
public final Token getNextToken(
)
No description available for this method.
getOperator
public int getOperator(
)
Gets implicit operator setting, which will be either DEFAULT_OPERATOR_AND
or DEFAULT_OPERATOR_OR.
getPhraseSlop
public int getPhraseSlop(
)
Gets the default slop for phrases.
getPrefixQuery
protected Query getPrefixQuery(
String field,
String termStr
)
throws
ParseException
Factory method for generating a query (similar to
(getWildcardQuery). Called when parser parses an input term
token that uses prefix notation; that is, contains a single '*' wildcard
character as its last character. Since this is a special case
of generic wildcard term, and such a query can be optimized easily,
this usually results in a different query object.
Depending on settings, a prefix term may be lower-cased
automatically. It will not go through the default Analyzer,
however, since normal Analyzers are unlikely to work properly
with wildcard templates.
Can be overridden by extending classes, to provide custom handling for
wild card queries, which may be necessary due to missing analyzer calls.
getRangeQuery
protected Query getRangeQuery(
String field,
Analyzer analyzer,
String part1,
String part2,
boolean inclusive
)
throws
ParseException
Note that parameter analyzer is ignored. Calls inside the parser always
use class member analyser. This method will be deprecated and substituted
by getRangeQuery(String,String,String,boolean) in future versions of Lucene.
Currently overwriting either of these methods works.
getRangeQuery
protected Query getRangeQuery(
String field,
String part1,
String part2,
boolean inclusive
)
throws
ParseException
No description available for this method.
getToken
public final Token getToken(
int index
)
No description available for this method.
getWildcardQuery
protected Query getWildcardQuery(
String field,
String termStr
)
throws
ParseException
Factory method for generating a query. Called when parser
parses an input term token that contains one or more wildcard
characters (? and *), but is not a prefix term token (one
that has just a single * character at the end)
Depending on settings, prefix term may be lower-cased
automatically. It will not go through the default Analyzer,
however, since normal Analyzers are unlikely to work properly
with wildcard templates.
Can be overridden by extending classes, to provide custom handling for
wildcard queries, which may be necessary due to missing analyzer calls.
Modifiers
public final int Modifiers(
)
throws
ParseException
No description available for this method.
parse
public Query parse(
String query
)
throws
ParseException
Parses a query string, returning a
Query.
Query
public final Query Query(
String field
)
throws
ParseException
No description available for this method.
ReInit
public void ReInit(
CharStream stream
)
No description available for this method.
ReInit
public void ReInit(
QueryParserTokenManager tm
)
No description available for this method.
setFuzzyMinSim
public void setFuzzyMinSim(
float fuzzyMinSim
)
Set the default minimum similarity for fuzzy queries.
setLocale
public void setLocale(
Locale locale
)
Set locale used by date range parsing.
setLowercaseWildcardTerms
public void setLowercaseWildcardTerms(
boolean lowercaseWildcardTerms
)
No description available for this method.
setOperator
public void setOperator(
int operator
)
Sets the boolean operator of the QueryParser.
In classic mode (DEFAULT_OPERATOR_OR) terms without any modifiers
are considered optional: for example capital of Hungary is equal to
capital OR of OR Hungary.
In DEFAULT_OPERATOR_AND terms are considered to be in conjuction: the
above mentioned query is parsed as capital AND of AND Hungary
setPhraseSlop
public void setPhraseSlop(
int phraseSlop
)
Sets the default slop for phrases. If zero, then exact phrase matches
are required. Default value is zero.
Term
public final Query Term(
String field
)
throws
ParseException
No description available for this method.
|