[
https://issues.apache.org/jira/browse/LUCENE-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793453#comment-16793453
]
Alan Woodward commented on LUCENE-3041:
---------------------------------------
I've uploaded a patch backporting
[https://github.com/apache/lucene-solr/pull/581] to 8x - the main differences
between this and the master commit being that Query.visit() has a default
implementation, and Weight.extractTerms() is deprecated rather than removed
entirely
> 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: Alan Woodward
> Priority: Minor
> Fix For: 4.9, 6.0
>
> Attachments: LUCENE-3041-8x.patch, 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: [email protected]
For additional commands, e-mail: [email protected]