diff --git a/index/scorch/snapshot_index_tfr.go b/index/scorch/snapshot_index_tfr.go index 61537fc4f..f9c4bf12b 100644 --- a/index/scorch/snapshot_index_tfr.go +++ b/index/scorch/snapshot_index_tfr.go @@ -17,6 +17,7 @@ package scorch import ( "bytes" "fmt" + "math" "reflect" "sync/atomic" @@ -100,7 +101,11 @@ func (i *IndexSnapshotTermFieldReader) postingToTermFieldDoc(next segment.Postin rv.Freq = next.Frequency() } if i.includeNorm { - rv.Norm = next.Norm() + if i.snapshot.parent.segPlugin.Version() >= 15 { + rv.Norm = float64(1.0 / math.Sqrt(float64(next.Norm()))) + } else { + rv.Norm = next.Norm() + } } if i.includeTermVectors { locs := next.Locations()