apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.64k stars 1.03k forks source link

sumOfSquared weights should be calculated as part of queryNorm [LUCENE-1907] #2982

Open asfimport opened 15 years ago

asfimport commented 15 years ago

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 by Mark Miller (@markrmiller), updated May 04 2010 Attachments: LUCENE-1907.patch (versions: 3) Linked issues:

asfimport commented 15 years ago

Mark Miller (@markrmiller) (migrated from JIRA)

fix a test and improve a bit

asfimport commented 14 years ago

Mark Miller (@markrmiller) (migrated from JIRA)

to trunk