[
https://issues.apache.org/jira/browse/LUCENE-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17113528#comment-17113528
]
Adrien Grand commented on LUCENE-7368:
--------------------------------------
[~ddaniliuc] It was intentional. This second IDF factor was only used for the
normalization logic, the IDF would not be squared in the final score.
See how IndexSearcher#createNormalizedWeight works:
[https://github.com/apache/lucene-solr/blob/branch_6x/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java#L732-L742],
here is what would happen for a TermQuery and ClassicSimilarity:
- The term weight is initially computed as {{boost * IDF^2}} as you noted.
- {{float v = weight.getValueForNormalization(); // v == boost^2 * IDF^2}}
- {{float norm = getSimilarity(needsScores).queryNorm(v); // norm == 1/sqrt(v)
== 1/(boost * IDF)}}
- {{weight.normalize(norm, 1.0f); // value == norm * boost * IDF^2 == IDF}}
Can you share the output of {{IndexSearcher#explain}} before and after the
change?
> Remove queryNorm
> ----------------
>
> Key: LUCENE-7368
> URL: https://issues.apache.org/jira/browse/LUCENE-7368
> Project: Lucene - Core
> Issue Type: Sub-task
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Major
> Fix For: 7.0
>
> Attachments: LUCENE-7368.patch
>
>
> Splitting LUCENE-7347 into smaller tasks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]