lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3041) Support Query Visting / Walking
Date Sat, 23 Apr 2011 14:22:05 GMT


Simon Willnauer commented on LUCENE-3041:

bq. I'm happy to settle with QueryProcessor#process

+1 - Chris are you cranking out a patch for this?

I think if we have a QueryProcessor we should somehow make it possible to optionally hook
it into IndexSearcher to essentially replace the direct call to Query#rewrite
Eventually it should be the QueryProcessor's responsibility to rewrite the query and pass
the actual 'primitive' query to the searcher once done. I think its good to keep that interface
super lean and let more fancy impl. follow up on it. Stuff like automatic dispatch for certain
query types might need some cglib magic or at least req. java 6 to perform so they might need
to go to contrib/misc.

> Support Query Visting / Walking
> -------------------------------
>                 Key: LUCENE-3041
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Chris Male
>            Priority: Minor
> Out of the discussion in LUCENE-2868, it could be useful to add a generic Query Visitor
/ Walker that could be used for more advanced rewriting, optimizations or anything that requires
state to be stored as each Query is visited.
> We could keep the interface very simple:
> {code}
> public interface QueryVisitor {
>   Query visit(Query query);
> }
> {code}
> and then use a reflection based visitor like Earwin suggested, which would allow implementators
to provide visit methods for just Querys that they are interested in.

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message