From c7bd8730f2b615141b932e501debecc6bccb159d Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Wed, 13 Nov 2024 13:53:16 +0100 Subject: [PATCH] Skip bitvector dictionary lookup for words with no posting list. --- searchlib/src/vespa/searchlib/diskindex/field_index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searchlib/src/vespa/searchlib/diskindex/field_index.cpp b/searchlib/src/vespa/searchlib/diskindex/field_index.cpp index cc318a68445a..dac7b1cf7a5f 100644 --- a/searchlib/src/vespa/searchlib/diskindex/field_index.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/field_index.cpp @@ -210,7 +210,7 @@ FieldIndex::read_posting_list(const DictionaryLookupResult& lookup_result) const BitVectorDictionaryLookupResult FieldIndex::lookup_bit_vector(const DictionaryLookupResult& lookup_result) const { - if (!_bit_vector_dict) { + if (!_bit_vector_dict || !lookup_result.valid()) { return {}; } return _bit_vector_dict->lookup(lookup_result.wordNum);