[ https://issues.apache.org/jira/browse/LUCENE-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065320#comment-13065320 ]
Simon Willnauer commented on LUCENE-3041: ----------------------------------------- bq. Yes I definitely am going to revisit this. I'm still unsure how best to incorporate this into IndexSearcher so that it can work per-segment. But we can commit the functionality and then deal with the integration separately. actually this already works per segment in a way it should. If you look at rewriting this is done based on the IS anyway for a query so we only rewrite once. If you are inside a MTQ and you want to do the rewrite caching or other things you can do this based on the IS. The question is if we should really commit this without any specific usecase or other code using it :/ are you going to address earwins issue still? > Support Query Visting / Walking > ------------------------------- > > Key: LUCENE-3041 > URL: https://issues.apache.org/jira/browse/LUCENE-3041 > Project: Lucene - Java > Issue Type: Improvement > Components: core/search > Affects Versions: 4.0 > Reporter: Chris Male > Assignee: Simon Willnauer > Priority: Minor > Fix For: 4.0 > > Attachments: LUCENE-3041.patch, LUCENE-3041.patch, LUCENE-3041.patch, > 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: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org