Class 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
Inherited Members
Assembly: Lucene.Net.QueryParser.dll
Syntax
[Serializable]
public class ComplexPhraseQueryParser : QueryParser, ICommonQueryParserConfiguration
Constructors
Name | Description |
---|---|
ComplexPhraseQueryParser(LuceneVersion, String, Analyzer) |
Properties
Name | Description |
---|---|
InOrder | When InOrder is true, the search terms must exists in the documents as the same order as in query. Choose between ordered (true) or un-ordered (false) proximity search. |