Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Namespace Lucene.Net.QueryParsers.ComplexPhrase

    QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"

    Classes

    ComplexPhraseQueryParser

    QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".

    Performs potentially multiple passes over Query text to parse any nested logic in PhraseQueries. - First pass takes any PhraseQuery content between quotes and stores for subsequent pass. All other query content is parsed as normal - Second pass parses any stored PhraseQuery content, checking all embedded clauses are referring to the same field and therefore can be rewritten as Span queries. All PhraseQuery clauses are expressed as ComplexPhraseQuery objects

    This could arguably be done in one pass using a new QueryParser but here I am working within the constraints of the existing parser as a base class. This currently simply feeds all phrase content through an analyzer to select phrase terms - any "special" syntax such as * ~ * etc are not given special status

    ComplexPhraseQueryParser.ComplexPhraseQuery

    Used to handle the query content in between quotes and produced Span-based interpretations of the clauses.

    • Improve this Doc
    Back to top Copyright © 2022 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.