aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-06-07 10:39:11 +0200
committerTor Egge <Tor.Egge@online.no>2021-06-07 10:39:11 +0200
commitfe17ca93c19ddd2ac5d6378b0bccdfd540808a2b (patch)
treef51c7bbfd8b34e8bd9551dd8a3c87befccc659ec /searchlib
parentf55ebedd8973e5ef414dcdced5471fc381c998f3 (diff)
Update _bvs when compacting buffers containing bitvector entries.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index 6c62e650345..477917debf0 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
@@ -696,7 +696,10 @@ PostingStore<DataT>::move(EntryRef ref)
if (!_store.getCompacting(ref)) {
return ref;
}
- return allocBitVectorCopy(*bve).ref;
+ auto new_ref = allocBitVectorCopy(*bve).ref;
+ _bvs.erase(ref.ref());
+ _bvs.insert(new_ref.ref());
+ return new_ref;
} else {
if (!_store.getCompacting(ref)) {
return ref;