lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Basic Queries are not pluggable
Date Fri, 12 Jun 2009 15:31:43 GMT


On Fri, Jun 12, 2009 at 9:11 AM, Simon
Willnauer<> wrote:
> Hey there,
> I have a had quite a couple of usecases where I had to change some
> tiny things in basic queries like BooleanQuery. I subclassed those
> queries and applied the change - no problem so far. But I wanted
> lucene to use this modified query everywhere in other queries and (for
> sure) in the query parser. The query parser integration was easy -
> subclassed it and override new*Query() methods. The rest of lucene was
> a nightmare and I eventually used a source distribution and changed it
> in the actual implementation - don't comment this, I hate it!
> I thought about this topic for a while and want to throw it out to the
> list for discussion.
> I would really appreciate to see some kind of factory methods used for
> query construction for instance in the Query#rewrite() implementations
> as well as in the QueryParser classes. Such a factory could be user
> provided or by default simple call the constructor of the target
> class. A patch for this would not break and backwards compat. afaik
> and could help quite a couple of people out there I guess.
> simon
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message