fix bug introduced by reuse of TermFrequencyRow values
in a recent commit, we changed the code to reuse TermFrequencyRow objects intsead of constantly allocating new ones. unfortunately, one of the original methods was not coded with this reuse in mind, and a lazy initialization cause us to leak data from previous uses of the same object. in particular this caused term vector information from previous hits to still be applied to subsequent hits. eventually this causes the highlighter to try and highlight invalid regions of a slice. fixes #404
This commit is contained in:
parent
389e18a779
commit
da794d3762
|
@ -544,6 +544,7 @@ func (tfr *TermFrequencyRow) parseV(value []byte) error {
|
|||
|
||||
tfr.norm = math.Float32frombits(uint32(norm))
|
||||
|
||||
tfr.vectors = nil
|
||||
var field uint64
|
||||
field, bytesRead = binary.Uvarint(value[currOffset:])
|
||||
for bytesRead > 0 {
|
||||
|
|
Loading…
Reference in New Issue