QueryParserHelper

open class QueryParserHelper(queryConfigHandler: QueryConfigHandler?, syntaxParser: SyntaxParser, processor: QueryNodeProcessor?, builder: QueryBuilder)

This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.

It contains methods that allows the user to change the implementation used on the three phases.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(queryConfigHandler: QueryConfigHandler?, syntaxParser: SyntaxParser, processor: QueryNodeProcessor?, builder: QueryBuilder)

Properties

Link copied to clipboard

Returns the query builder used to build a object from the query node tree. The object produced by this builder is returned by parse.

Link copied to clipboard

Returns the query configuration handler, which is used during the query node tree processing. It can be null.

Link copied to clipboard

Returns the processor object used to process the query node tree, it returns null if no processor is used.

Link copied to clipboard

Returns the text parser used to build a query node tree from a query string. The default text parser instance returned by this method is a SyntaxParser.

Functions

Link copied to clipboard
open fun parse(query: String, defaultField: String?): Any?

Parses a query string to an object, usually some query object.

In this method the three phases are executed:

     1st - the query string is parsed using the text parser returned by syntaxParser, the result is a query node tree

     2nd - the query node tree is processed by the processor returned by queryNodeProcessor

     3th - a object is built from the query node tree using the builder returned by queryBuilder