To answer my own question, it appears that despite the warning, using a custom similarity only at search time appears to be working. The score() method was the wrong code to override, I simply hardcoded the return value of decodeNormValue to 1.0. Since this value is used for normalization, as long as I am consistent, it should be valid.
Now onto the real testing. Cheers, Ivan On Mon, Dec 9, 2013 at 9:41 AM, Ivan Brusic <i...@brusic.com> wrote: > I am currently using document-level boosts, which really translates to > changing the norm for every field under the covers. As part of an > experiment, I want to remove the boost, but that would require either > re-indexing content or changing the scoring algorithm (similarity). > > If I create my own similarity, which would be identical to the > default/TFIDF similarity but with the norm hardcoded to 1.0. The Lucene > source warns against such behavior. I am assuming this is because it > appears computeNorm is only run at index time,but shouldn't I be able to > override score() and ignore the decodeNormValue calculation? > > Cheers, > > Ivan >