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 Wed, 27 Apr 2011 08:39:03 GMT


Simon Willnauer commented on LUCENE-3041:

Chris, nice simplification. I have one question, lets say we have a boolean query OR(AND(Fuzzy:A,
Fuzzy:B), AND(Fuzzy A, Fuzzy:C)) how would it be possible with the current patch to reuse
the rewrite for Fuzzy:A? As far as I can see If I don't rewrite the boolean query myself the
current patch will rewrite the top level query and returns right? So somehow it must be possible
to walk down the query ast.

or do I miss something?

> Support Query Visting / Walking
> -------------------------------
>                 Key: LUCENE-3041
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Chris Male
>            Priority: Minor
>         Attachments: LUCENE-3041.patch, LUCENE-3041.patch
> 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