lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <>
Subject Re: query parser field name aliases
Date Mon, 05 Jun 2006 18:24:53 GMT
On Mon, 2006-06-05 at 10:41 -0700, Chris Hostetter wrote:
> you might be able to go with a Delegator/Wrapper .. subclass
> QueryParser to inherit the grammer, override all of the normal methods
> you override in a subclass to include your field aliasing, but instead
> of defering to super defer to another instance of QueryParser
> specified at runtime.

A.k.a. decorator ;)

> I haven't thought through all the implications of wether it will work
> that easily though .. there's a lot more intra-class ""
> calls in Queryparser then in something like Similarity that may make
> the Delegator approach problamatic.

Indeed this is something I've noticed.

> Honestly: QueryParser is such a mess, you may just want to roll your
> own from scratch. 

I've considered an ANTlr parser as it could generate code for many ports
too, but as always there is too little time.

Probably I'll just end up hacking.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message