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

Atri Sharma commented on LUCENE-8881:
-------------------------------------

[~romseygeek] Agreed, however, we could use QueryVisitor's recursion mechanism 
to get query specific rewrites done (please see my PR to add metadata state to 
QueryVisitor). We could add a boolean property saying DO_REWRITE=true and fire 
a visitor, and each query checks for that property.

 

My main point is that it seems incorrect for two query tree traversal 
mechanisms to exist independently. This Jira is primarily opened to trade 
thoughts on that front, and maybe see if we can draw a common baseline between 
the two existing mechanisms. WDYT?

> Query.rewrite Should Move To QueryVisitor
> -----------------------------------------
>
>                 Key: LUCENE-8881
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8881
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Atri Sharma
>            Priority: Major
>
> Now that we have QueryVisitor, the rewrite functionality should belong there, 
> since rewrite is essentially a recursive visitation of underlying queries, 
> which sounds exactly as what QueryVisitor is designed to be.



--
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