The parser supports multiple indices. You must provide a set of index aliases that the user will use to select indices, and the name of the default index alias to be used. After that, you parse a query by using the {@link #parse(String)} method.
The parser generated by JavaCC for this class will break terms using operators and nonspace-to-space transitions. Operators can be included in terms, if needed, using the backslash, which acts as an escape character, and makes the next character (usually an operator) a standard character. The syntax of the parser can be seen in action in the documentation of the package {@link it.unimi.dsi.mg4j.search}.
The parser returns a {@link it.unimi.dsi.mg4j.query.nodes.Query}—an abstract representation of the query string that can be turned later into a {@link it.unimi.dsi.mg4j.search.DocumentIterator}.
If a {@link TermProcessor} is specified, it will be applied to the terms found in thequery string. This can lead to transformations (e.g., downcasing) or generate an exception if the query string contains terms filtered by the term processor. @author Sebastiano Vigna @author Paolo Boldi @since 1.0.1
KEYWORD "STRING" [more strings...] KEYWORD NUMBER [more numbers...] KEYWORD { KEYWORD... ... ... } KEYWORD... ...The accepted keywords are given to the parser as an array. C and C++ style comments are supported. Values are read in SimpleParser.Entity and SimpleParser.Record objects. SimpleParser.Entity represents one entry starting with a keyword. Entity can contain a string or a number (or arrays of them) or a SimpleParser.Record. SimpleParser.Record represents a block inside '{' and '}' and contains Entities Created: Mon Aug 21 14:05:35 2000
|
|
|
|
|
|
|
|
|
|