Class QueryParser
This class is generated by JavaCC. The only method that clients should need to call is Parse(String).
This parser generates queries that make use of position information
(Span queries). It provides positional operators (w
and
n
) that accept a numeric distance, as well as boolean
operators (and
, or
, and not
,
wildcards (///
and ?
), quoting (with
"
), and boosting (via ^
).
The operators (W, N, AND, OR, NOT) can be expressed lower-cased or
upper-cased, and the non-unary operators (everything but NOT) support
both infix (a AND b AND c)
and prefix AND(a, b,
c)
notation.
The W and N operators express a positional relationship among their operands. N is ordered, and W is unordered. The distance is 1 by default, meaning the operands are adjacent, or may be provided as a prefix from 2-99. So, for example, 3W(a, b) means that terms a and b must appear within three positions of each other, or in other words, up to two terms may appear between a and b.
Inheritance
Inherited Members
Assembly: Lucene.Net.QueryParser.dll
Syntax
[Serializable]
public class QueryParser
Constructors
Name | Description |
---|---|
QueryParser() | |
QueryParser(ICharStream) | Constructor with user supplied ICharStream. |
QueryParser(QueryParserTokenManager) | Constructor with generated Token Manager. |
Properties
Name | Description |
---|---|
Jj_nt | Next token. |
Token | Current token. |
TokenSource | Generated Token Manager. |