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

Adrien Grand commented on LUCENE-6695:
--------------------------------------

bq. I would make rewrite() a protected method

I think we should do that. The only purpose of rewriting a query is to create a 
Weight, so we need to reduce the visibility of this method or remove it 
(trickier). Also I think it's very trappy today that createWeight is not 
functional unless you have a rewritten query.

I think there are several issues with RewriteableQuery, for instance compound 
queries would not be able anymore to rewrite their inner queries, and also we 
have several queries that implement both rewrite() and createWeight().

> BlendedTermQuery
> ----------------
>
>                 Key: LUCENE-6695
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6695
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6695.patch, LUCENE-6695.patch
>
>
> It is sometimes desirable to ignore differences between index statistics of 
> several terms so that they produce the same scores, for instance if you 
> resolve synonyms at search time or if you want to search across several 
> fields. Elasticsearch has been using this approach for its multi_match query 
> for some time now.
> We already blend statistics in TopTermsBlendedFreqScoringRewrite (used by 
> FuzzyQuery) but it could be helpful to have a dedicated query to choose 
> manually which terms to blend stats from.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to