Hi Markus,
I confirm (if that counts) that all current built-in similarities (expect Sweet 
spot) save same stuff into the norms.

They can be switched/changed at search time. Actually, I am doing this today 
with Lucene, experimenting different term-weighting models using a single 
index. It would be impractical to create a dedicated/separate index for each 
term weighting model (similarity).


Only assumption here is, their discountOverlap should remain same with the one 
used at index time.

But of course we cannot make any assumptions regarding custom similarity 
implementations.

As Hoss pointed out, discountOverlap affects the way document length calculated.
It cannot be changed on the search time. 

Thanks,
Ahmet






On Tuesday, December 15, 2015 9:43 PM, Chris Hostetter 
<hossman_luc...@fucit.org> wrote:


: Sweetspot does require reindexing but is that the only one? I have not 
: investigated some exotic implementations, anyone to confirm sweetspot is 
: the only one? In that case you could patch QueryComponent right, instead 
: of having a custom component?

I'm not sure how where this thread developed this weird assumption that 
switching from/to SweetSpotSimilarity in particular requires reindexing 
but that many/most other Similarities wouldn't require this ...  
SweetSpotSimilarity certainly has explicit config options for tuning the 
index time field norm, but it's not a special case...

1) Solr shouldn't make any naive assumptions about whatever 
arbitrary (custom) Similarity class a user might provide -- particularly 
when it comes to field norms, since the all of the Similarity base classes 
/ callers have been setup to make it trivial for people to write custom 
ismilarities for the express purpose of adjusting how many bits are used 
by field norms.

2) In both ClassicSimilarity and BM25Similarity (the new default in Solr6) 
the config option "discountOverlaps" impacts what norm values get encoded 
at index time for a given field length -- so it's possible to break things 
w/o even switching what class you use, w/o even consider custom Similarity 
impls (or new out of the box similarity classes that might be added to 
Solr tomorow)


-Hoss
http://www.lucidworks.com/

Reply via email to