![]() Modify nodes or even the tree's structure. It is in fact aĬonfigurable chain of processors. QueryNodeProcessor The query node processors do most of the work. Lucene default implementations implements it using JavaCC. This layer is the text parsing layer which simply transforms the It is a tree that initially represents the syntax of the original query, e.g. The query parser has three layers and its core is what we call the QueryNode tree. It allows to write a parser with a new syntax, while reusing the underlying semantics, as quickly as possible. whether and how to tokenize/lemmatize/normalize the different terms or which Query objects to create for the terms. It distinguishes the semantics of the different query components, e.g. 'a AND b', '+a +b', 'AND(a,b)' could be different syntaxes for the same query. The new query parser goal is to separate syntax and semantics of a query. This code is much more flexible and extensible than the Lucene query parser in 2.4.X. This new query parser was designed to have very generic architecture, so that it can be easily used for different products with varying query syntaxes. QueryNode tree's can be converted to a lucene 2.4 syntax string, using toQueryString Supported conversion is using a 2.4 compatible logic Standard Builders - convert QueryNode's into several lucene Processors Pipelines - Select your favorite ProcessorĪnd build a processor pipeline, to implement the features you needĬonfig Interfaces - Allow the consumer of the Query Parser to implementĪ diff Config Handler Objects to suite their needs. QueryNode Processors - Optimize, validate, rewrite the That can be converted into similar syntax QueryNode trees. QueryNode Trees - support for several syntaxes, Featuresįull support for boolean logic (not enabled) * .Standard: it contains the current Lucene query parser implementation using the new query parser API. It's currently divided in 2 main packages: * .Core: it contains the query parser API classes, which should be extended by query parser implementations. This project contains the new Lucene query parser implementation, which matches the syntax of the core QueryParser but offers a more modular architecture to enable customization. QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*" ExtendableĮxtendable QueryParser provides a simple and flexible extension mechanism by overloading query field names. ![]() QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer. This module provides a number of queryparsers:Ī Simple Lucene QueryParser implemented with JavaCC.
0 Comments
Leave a Reply. |