lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Custom Query Syntax/Parser
Date Mon, 28 Jan 2013 23:24:41 GMT
On Tue, Jan 29, 2013 at 3:42 AM, Andrew Gilmartin
<andrew@andrewgilmartin.com> wrote:
> When I first started using Lucene, Lucene's Query classes where not suitable
> for use with the Visitor pattern and so I created my own query class
> equivalants and other more specialized ones. Lucene's classes might have
> changed since then (I do not know)

On that subject, the infrastructure behind StandardQueryParser is
along those lines. Query itself is still not very flexible, but
QueryNode is much more convenient and there are processors for walking
the tree to do transformations.

We ended up using ANTLR to do the syntax parsing for our stuff and
then using most of the standard transformations as-is, decorated in
some cases (either to customise or to work around bugs.) Of course we
had to add our own for all the new features, but we got a fair bit of
reuse out of the new framework.

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message