Show / Hide Table of Contents

    Class ParserExtension

    This class represents an extension base class to the Lucene standard QueryParser. The QueryParser is generated by the JavaCC parser generator. Changing or adding functionality or syntax in the standard query parser requires changes to the JavaCC source file. To enable extending the standard query parser without changing the JavaCC sources and re-generate the parser the ParserExtension can be customized and plugged into an instance of ExtendableQueryParser, a direct subclass of QueryParser.

    Inheritance
    System.Object
    ParserExtension
    Namespace: Lucene.Net.QueryParsers.Ext
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public abstract class ParserExtension : object

    Methods

    | Improve this Doc View Source

    Parse(ExtensionQuery)

    Processes the given ExtensionQuery and returns a corresponding instance. Subclasses must either return a instance or raise a ParseException. This method must not return null.

    Declaration
    public abstract Query Parse(ExtensionQuery query)
    Parameters
    Type Name Description
    ExtensionQuery query

    the extension query

    Returns
    Type Description
    Query

    a new query instance

    Exceptions
    Type Condition
    ParseException

    if the query can not be parsed.

    See Also

    Extensions
    ExtendableQueryParser
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)