sumOfSquared weights should be calculated as part of queryNorm [LUCENE-1907]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
see the related issue for comments.
its a bummer - doesn't look like we have time to address this, but its the best release for it - back compat requires the reflection stuff that Similarity already has (and we hope to remove next release). It would suck to have to hold onto it - so it seems unlikely we will do this at a later time.
The idea is that the sumOfSquaredWeights computation should be specific to the queryNorm impl - so the queryNorm should accept the Weight instead, and if its using the euclidean distance formula, it can do the sumOfSquared calculations - but if its doing another normalization, these can be skipped (in each termweight, booleanweight, etc). Right now you pay for sumOfSquared no matter what, and the logic separation is a little off.
---
Migrated from [LUCENE-1907](https://issues.apache.org/jira/browse/LUCENE-1907) by Mark Miller (@markrmiller), updated May 04 2010
Attachments: [LUCENE-1907.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-1907/LUCENE-1907.patch) (versions: 3)
Linked issues:
- #2971
Contributor guide
Research direction
Start with the related LUCENE-1907 issue and linked issue #2971, then inspect Similarity.queryNorm, Weight, and the termweight and booleanweight implementations mentioned in the report. Compare the attached LUCENE-1907.patch with the current behavior. Done means the sumOfSquaredWeights computation is specific to the queryNorm implementation without retaining unnecessary reflection support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100