Package com.gengoai.hermes.corpus
Class QueryParser
- java.lang.Object
-
- com.gengoai.hermes.corpus.QueryParser
-
public final class QueryParser extends Object
Simple query to predicate constructor for basic keyword queries over corpora. Syntax is as follows:- 'TERM' - keyword or phrase
- AND - and terms
- OR - or terms
- - - not term
- $ATTRIBUTE(value) - filter based on exact matches for document level attributes
- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description QueryParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Query
parse(String query)
Parses the given query in string form into aQuery
object.
-
-
-
Method Detail
-
parse
public static Query parse(String query) throws ParseException
Parses the given query in string form into aQuery
object.- Parameters:
query
- the query to parse- Returns:
- the Query represented by the
- Throws:
ParseException
- error parsing the query
-
-