[
https://issues.apache.org/jira/browse/LUCENE-6295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14336780#comment-14336780
]
Robert Muir commented on LUCENE-6295:
-------------------------------------
The main thing i hate is Query.rewrite(IndexReader). Queries are supposed to be
independent of readers, so to me this is wrong. Also most implementations of
rewrite don't need the reader, only special cases like multitermquery do.
On the other hand Weights are already bound to a reader, so I think thats how
multitermquery should work.
Maybe we should have both?
{code}
Query.rewrite(); // 95% of our current rewrites just stay as-is.
Weight.rewrite(); // stuff like multitermquery
{code}
> Remove Query.rewrite?
> ---------------------
>
> Key: LUCENE-6295
> URL: https://issues.apache.org/jira/browse/LUCENE-6295
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
>
> Queries are a bit hard to consume because of their complicated workflow: your
> first need to rewrite before creating a weight. Maybe we could simplify it
> and make query rewriting part of creating the weight?
> If a user would like to have access to the rewritten query, he could still
> call Query.createWeight(searcher, needsScores).getQuery() instead of
> Query.rewrite?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]