|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.querying.parser.QueryParser
public class QueryParser
Useful class to parse the query. (We should have had this class years ago). This class replaces all replicated code about how to parse a String query into a Query tree, and add it to a pre-existing search request. This is most often called from Manager.newSearchRequest(String,String), although client code can use this method when other forms of Manager.newSearchRequest() are used. Note that this class throws QueryParserException when it gets upset.
Constructor Summary | |
---|---|
QueryParser()
|
Method Summary | |
---|---|
static Query |
parseQuery(java.lang.String query)
Parse the specified query. |
static void |
parseQuery(java.lang.String query,
SearchRequest srq)
Parse the query specified in String query, and use it for the specified search request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryParser()
Method Detail |
---|
public static void parseQuery(java.lang.String query, SearchRequest srq) throws QueryParserException
query
- The string query to parsesrq
- The request object that the manager can use
QueryParserException
- when the query cannot be parsedpublic static Query parseQuery(java.lang.String query) throws QueryParserException
query
- The string query to parse
QueryParserException
- when the query cannot be parsed
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |