[ 
https://issues.apache.org/jira/browse/LUCENE-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16792759#comment-16792759
 ] 

ASF subversion and git services commented on LUCENE-3041:
---------------------------------------------------------

Commit fbd05167f455e3ce2b2ead50336e2b9c2521cd6c in lucene-solr's branch 
refs/heads/master from Alan Woodward
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=fbd0516 ]

LUCENE-3041: QueryVisitor (#581)

This commit adds an introspection API to Query, allowing users to traverse
the nested structure of a query and examine its leaves.  It replaces the 
existing
`extractTerms` method on Weight, and alters some highlighting code to use
the new API

> Support Query Visting / Walking
> -------------------------------
>
>                 Key: LUCENE-3041
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3041
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 4.0-ALPHA
>            Reporter: Chris Male
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.9, 6.0
>
>         Attachments: LUCENE-3041.patch, LUCENE-3041.patch, LUCENE-3041.patch, 
> LUCENE-3041.patch, LUCENE-3041.patch, LUCENE-3041.patch
>
>          Time Spent: 26h
>  Remaining Estimate: 0h
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to