1

I know that solr uses normalization of floats to save memory and speed up computing by mapping them to 2 bytes representation. So my question -- is it ok to use any float numbers to boost my terms in query (i.e., a^0.00001 +b^0.11111) or should I normolize them somehow to not lose precision of solr/lucene computation? Say make them between 1 to 1000 and make them power of 2.

Jim Ferrans
  • 30,582
  • 12
  • 56
  • 83
yura
  • 14,489
  • 21
  • 77
  • 126

1 Answers1

1

Although index-time boosts are compressed and may lead to an important precision loss when computing scores (for example, see In Lucene, why do my boosted and unboosted documents get the same score?), this is not the case for query-time boosts.

Query-time boosts are Java floats and participate in scores using Java arithmetical operators. Of course there can be accuracy problems with floating-point arithmetics, but this is very unlikely to influence the scoring in a way that documents appear in an irrelevant order in a result set.

Community
  • 1
  • 1
jpountz
  • 9,904
  • 1
  • 31
  • 39