|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface QueryParser
Constructs QueryParser
| 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 |
void |
setUp(java.lang.String f,
Analyzer a,
SearchLocations sl,
int phraseSlop,
int operator)
Sets the fields of the query parser |
| Field Detail |
|---|
static final int DEFAULT_OPERATOR
static final int OPERATOR_OR
static final int OPERATOR_AND
static final int DEFAULT_PHRASE_SLOP
| Method Detail |
|---|
void setUp(java.lang.String f,
Analyzer a)
f - the default field for query terms.a - used to find terms in the query text.
void setUp(Analyzer a,
int phraseSlop,
int operator)
a - used to find terms in the query text.phraseSlop - the slopoperator - the operator
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
void setUp(java.lang.String f,
Analyzer a,
SearchLocations sl,
int phraseSlop,
int operator)
f - the default field for query terms.a - used to find terms in the query text.sl - SearchLocationsphraseSlop - the slopoperator - the operator
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 failsint getOperator()
int getPhraseSlop()
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
void setPhraseSlop(int i)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||