summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchlib/src/vespa/searchlib/common/bitvector.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/common/bitvector.cpp b/searchlib/src/vespa/searchlib/common/bitvector.cpp
index 598bc01da9a..f9f62087560 100644
--- a/searchlib/src/vespa/searchlib/common/bitvector.cpp
+++ b/searchlib/src/vespa/searchlib/common/bitvector.cpp
@@ -388,7 +388,6 @@ void
MMappedBitVector::read(Index numberOfElements, FastOS_FileInterface &file,
int64_t offset, Index doccount)
{
- assert((offset & (getAlignment() - 1)) == 0);
void *mapptr = file.MemoryMapPtr(offset);
assert(mapptr != nullptr);
if (mapptr != nullptr) {
diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp b/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp
index 055336c37c6..5f001b20dda 100644
--- a/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp
+++ b/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp
@@ -94,7 +94,8 @@ BitVectorDictionary::lookup(uint64_t wordNum)
return {};
}
int64_t pos = &*itr - &_entries[0];
- return BitVector::create(_docIdLimit, *_datFile, ((int64_t) _vectorSize) * pos + _datHeaderLen, itr->_numDocs);
+ int64_t offset = ((int64_t) _vectorSize) * pos + _datHeaderLen;
+ return BitVector::create(_docIdLimit, *_datFile, offset, itr->_numDocs);
}
}