|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Field Summary | |
static int |
DEFAULT_OPERATOR
|
static int |
DEFAULT_PHRASE_SLOP
|
static int |
OPERATOR_AND
|
static int |
OPERATOR_OR
|
| Method Summary | |
int |
getOperator()
Get's the operator |
int |
getPhraseSlop()
Gets the default slop for phrases. |
org.apache.lucene.search.Query |
parse(java.lang.String query)
Parses a query string, returning a Query. |
void |
setOperator(int i)
Set the boolean operator of the QueryParser. |
void |
setPhraseSlop(int i)
Sets the default slop for phrases. |
void |
setUp(Analyzer a,
int phraseSlop,
int operator)
Sets the fields of the query parser |
void |
setUp(java.lang.String f,
Analyzer a)
Sets the fields of the query parser |
void |
setUp(java.lang.String f,
Analyzer a,
int phraseSlop,
int operator)
Sets the fields of the query parser |
| Field Detail |
public static final int DEFAULT_OPERATOR
public static final int OPERATOR_OR
public static final int OPERATOR_AND
public static final int DEFAULT_PHRASE_SLOP
| Method Detail |
public void setUp(java.lang.String f,
Analyzer a)
f - the default field for query terms.a - used to find terms in the query text.
public void setUp(Analyzer a,
int phraseSlop,
int operator)
a - used to find terms in the query text.phraseSlop - the slopoperator - the operator
public void setUp(java.lang.String f,
Analyzer a,
int phraseSlop,
int operator)
f - the default field for query terms.a - used to find terms in the query text.phraseSlop - the slopoperator - the operator
public org.apache.lucene.search.Query parse(java.lang.String query)
throws ParseException,
TokenMgrError
query - the query string to be parsed.
ParseException - if the parsing fails
TokenMgrError - if ther parsing failspublic int getOperator()
public int getPhraseSlop()
public void setOperator(int i)
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
public void setPhraseSlop(int i)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||