diff --git a/configdefinitions/src/vespa/proton.def b/configdefinitions/src/vespa/proton.def index 3dae73d42603..5f7b008fbbfd 100644 --- a/configdefinitions/src/vespa/proton.def +++ b/configdefinitions/src/vespa/proton.def @@ -536,7 +536,7 @@ indexing.threads int default=1 restart ## How much memory is set aside for caching. ## Now only used for caching of dictionary lookups. -## TODO Still relevant, check config model, seems unused. +## DEPRECATED - Not used. index.cache.size long default=0 restart ## Configure a shared disk index posting list cache across all document dbs. diff --git a/searchcore/src/tests/proton/documentdb/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer_test.cpp index e446735b7dbc..2c24d3ed7261 100644 --- a/searchcore/src/tests/proton/documentdb/configurer_test.cpp +++ b/searchcore/src/tests/proton/documentdb/configurer_test.cpp @@ -215,7 +215,7 @@ Fixture::initViewSet(ViewSet &views) RankingAssetsRepo ranking_assets_repo_source(_constantValueFactory, {}, {}, {}); auto matchers = std::make_shared(_clock.nowRef(), _queryLimiter, ranking_assets_repo_source); auto indexMgr = make_shared(BASE_DIR, std::shared_ptr(), - IndexConfig(searchcorespi::index::WarmupConfig(), 2, 0), Schema(), 1, + IndexConfig(searchcorespi::index::WarmupConfig(), 2), Schema(), 1, views._reconfigurer, views._service.write(), _summaryExecutor, TuneFileIndexManager(), TuneFileAttributes(), views._fileHeaderContext); auto attrMgr = make_shared(BASE_DIR, "test.subdb", TuneFileAttributes(), diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp index 1d2f9b9342b3..116bf139232e 100644 --- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp +++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp @@ -100,7 +100,7 @@ FusionRunnerTest::FusionRunnerTest() _fusion_spec(), _fileHeaderContext(), _service(1), - _ops(_fileHeaderContext,TuneFileIndexManager(), {}, 0, _service.write()) + _ops(_fileHeaderContext,TuneFileIndexManager(), {}, _service.write()) { } FusionRunnerTest::~FusionRunnerTest() = default; diff --git a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp index 49d5fc4e42b1..ee00a3a57a8c 100644 --- a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp +++ b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp @@ -13,9 +13,8 @@ namespace proton { DiskIndexWrapper::DiskIndexWrapper(const std::string &indexDir, const TuneFileSearch &tuneFileSearch, - std::shared_ptr posting_list_cache, - size_t dictionary_cache_size) - : _index(indexDir, std::move(posting_list_cache), dictionary_cache_size), + std::shared_ptr posting_list_cache) + : _index(indexDir, std::move(posting_list_cache)), _serialNum(0) { bool setupIndexOk = _index.setup(tuneFileSearch); @@ -25,9 +24,8 @@ DiskIndexWrapper::DiskIndexWrapper(const std::string &indexDir, } DiskIndexWrapper::DiskIndexWrapper(const DiskIndexWrapper &oldIndex, - const TuneFileSearch &tuneFileSearch, - size_t dictionary_cache_size) - : _index(oldIndex._index.getIndexDir(), oldIndex._index.get_posting_list_cache(), dictionary_cache_size), + const TuneFileSearch &tuneFileSearch) + : _index(oldIndex._index.getIndexDir(), oldIndex._index.get_posting_list_cache()), _serialNum(0) { bool setupIndexOk = _index.setup(tuneFileSearch, oldIndex._index); diff --git a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.h b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.h index 95081f08b9cf..c49977caae31 100644 --- a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.h +++ b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.h @@ -16,12 +16,10 @@ class DiskIndexWrapper : public searchcorespi::index::IDiskIndex { public: DiskIndexWrapper(const std::string &indexDir, const search::TuneFileSearch &tuneFileSearch, - std::shared_ptr posting_list_cache, - size_t dictionary_cache_size); + std::shared_ptr posting_list_cache); DiskIndexWrapper(const DiskIndexWrapper &oldIndex, - const search::TuneFileSearch &tuneFileSearch, - size_t dictionary_cache_size); + const search::TuneFileSearch &tuneFileSearch); std::unique_ptr createBlueprint(const IRequestContext & requestContext, const FieldSpec &field, const Node &term) override { diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp index e9cd4ca182e7..67cdd39b7c46 100644 --- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp @@ -31,10 +31,8 @@ namespace proton::index { IndexManager::MaintainerOperations::MaintainerOperations(const FileHeaderContext &fileHeaderContext, const TuneFileIndexManager &tuneFileIndexManager, std::shared_ptr posting_list_cache, - size_t dictionary_cache_size, IThreadingService &threadingService) : _posting_list_cache(std::move(posting_list_cache)), - _dictionary_cache_size(dictionary_cache_size), _fileHeaderContext(fileHeaderContext), _tuneFileIndexing(tuneFileIndexManager._indexing), _tuneFileSearch(tuneFileIndexManager._search), @@ -54,14 +52,14 @@ IndexManager::MaintainerOperations::createMemoryIndex(const Schema& schema, IDiskIndex::SP IndexManager::MaintainerOperations::loadDiskIndex(const std::string &indexDir) { - return std::make_shared(indexDir, _tuneFileSearch, _posting_list_cache, _dictionary_cache_size); + return std::make_shared(indexDir, _tuneFileSearch, _posting_list_cache); } IDiskIndex::SP IndexManager::MaintainerOperations::reloadDiskIndex(const IDiskIndex &oldIndex) { return std::make_shared(dynamic_cast(oldIndex), - _tuneFileSearch, _dictionary_cache_size); + _tuneFileSearch); } bool @@ -90,7 +88,7 @@ IndexManager::IndexManager(const std::string &baseDir, const search::TuneFileIndexManager &tuneFileIndexManager, const search::TuneFileAttributes &tuneFileAttributes, const FileHeaderContext &fileHeaderContext) : - _operations(fileHeaderContext, tuneFileIndexManager, std::move(posting_list_cache), indexConfig.dictionary_cache_size, threadingService), + _operations(fileHeaderContext, tuneFileIndexManager, std::move(posting_list_cache),threadingService), _maintainer(IndexMaintainerConfig(baseDir, indexConfig.warmup, indexConfig.maxFlushed, schema, serialNum, tuneFileAttributes), IndexMaintainerContext(threadingService, reconfigurer, fileHeaderContext, warmupExecutor), _operations) diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h index 08828d8dc0ac..337ed1e777ca 100644 --- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h +++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h @@ -13,16 +13,14 @@ namespace proton::index { struct IndexConfig { using WarmupConfig = searchcorespi::index::WarmupConfig; - IndexConfig() : IndexConfig(WarmupConfig(), 2, 0) { } - IndexConfig(WarmupConfig warmup_, size_t maxFlushed_, size_t dictionary_cache_size_in) + IndexConfig() : IndexConfig(WarmupConfig(), 2) { } + IndexConfig(WarmupConfig warmup_, size_t maxFlushed_) : warmup(warmup_), - maxFlushed(maxFlushed_), - dictionary_cache_size(dictionary_cache_size_in) + maxFlushed(maxFlushed_) { } const WarmupConfig warmup; const size_t maxFlushed; - const size_t dictionary_cache_size; }; /** @@ -39,7 +37,6 @@ class IndexManager : public searchcorespi::IIndexManager using IDiskIndex = searchcorespi::index::IDiskIndex; using IMemoryIndex = searchcorespi::index::IMemoryIndex; std::shared_ptr _posting_list_cache; - const size_t _dictionary_cache_size; const search::common::FileHeaderContext &_fileHeaderContext; const search::TuneFileIndexing _tuneFileIndexing; const search::TuneFileSearch _tuneFileSearch; @@ -49,7 +46,6 @@ class IndexManager : public searchcorespi::IIndexManager MaintainerOperations(const search::common::FileHeaderContext &fileHeaderContext, const search::TuneFileIndexManager &tuneFileIndexManager, std::shared_ptr posting_list_cache, - size_t dictionary_cache_size, searchcorespi::index::IThreadingService &threadingService); IMemoryIndex::SP createMemoryIndex(const Schema& schema, diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp index 21769e94d8b9..b2ad6ad19983 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp @@ -74,7 +74,7 @@ namespace { index::IndexConfig makeIndexConfig(const ProtonConfig::Index & cfg) { - return {WarmupConfig(vespalib::from_s(cfg.warmup.time), cfg.warmup.unpack), size_t(cfg.maxflushed), size_t(cfg.cache.size)}; + return {WarmupConfig(vespalib::from_s(cfg.warmup.time), cfg.warmup.unpack), size_t(cfg.maxflushed)}; } ReplayThrottlingPolicy diff --git a/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp b/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp index 61b758ebb402..d2d42ecef34b 100644 --- a/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp +++ b/searchlib/src/tests/diskindex/diskindex/diskindex_test.cpp @@ -48,7 +48,6 @@ using search::fakedata::FPFactory; using search::fakedata::FakePosting; using search::fakedata::FakeWord; using search::fakedata::getFPFactory; -using LookupResult = DiskIndex::LookupResult; namespace { diff --git a/searchlib/src/vespa/searchlib/diskindex/diskindex.cpp b/searchlib/src/vespa/searchlib/diskindex/diskindex.cpp index 8da9aff14a08..a1e6ea38a674 100644 --- a/searchlib/src/vespa/searchlib/diskindex/diskindex.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/diskindex.cpp @@ -26,37 +26,13 @@ using namespace search::queryeval; namespace search::diskindex { -void swap(DiskIndex::LookupResult & a, DiskIndex::LookupResult & b) -{ - a.swap(b); -} - -DiskIndex::LookupResult::LookupResult() noexcept - : DictionaryLookupResult(), - indexId(0u) -{ -} - -DiskIndex::Key::Key() noexcept = default; -DiskIndex::Key::Key(IndexList indexes, std::string_view word) noexcept : - _word(word), - _indexes(std::move(indexes)) -{ -} - -DiskIndex::Key::Key(const Key &) = default; -DiskIndex::Key & DiskIndex::Key::operator = (const Key &) = default; -DiskIndex::Key::~Key() = default; - -DiskIndex::DiskIndex(const std::string &indexDir, std::shared_ptr posting_list_cache, size_t dictionary_cache_size) +DiskIndex::DiskIndex(const std::string &indexDir, std::shared_ptr posting_list_cache) : _indexDir(indexDir), - _dictionary_cache_size(dictionary_cache_size), _schema(), _field_indexes(), _nonfield_size_on_disk(0), _tuneFileSearch(), - _posting_list_cache(std::move(posting_list_cache)), - _cache(*this, dictionary_cache_size) + _posting_list_cache(std::move(posting_list_cache)) { calculate_nonfield_size_on_disk(); } @@ -143,97 +119,15 @@ DiskIndex::setup(const TuneFileSearch &tuneFileSearch, const DiskIndex &old) return true; } -DiskIndex::LookupResult +DictionaryLookupResult DiskIndex::lookup(uint32_t index, std::string_view word) { /** Only used for testing */ - IndexList indexes; - indexes.push_back(index); - Key key(std::move(indexes), word); - LookupResultVector resultV(1); - LookupResult result; - if ( read(key, resultV)) { - result.swap(resultV[0]); - } - return result; -} - -namespace { - -bool -containsAll(const DiskIndex::IndexList & indexes, const DiskIndex::LookupResultVector & result) -{ - for (uint32_t index : indexes) { - bool found(false); - for (size_t i(0); !found && (i < result.size()); i++) { - found = index == result[i].indexId; - } - if ( ! found ) { - return false; - } - } - return true; -} - -DiskIndex::IndexList -unite(const DiskIndex::IndexList & indexes, const DiskIndex::LookupResultVector & result) -{ - vespalib::hash_set all; - for (uint32_t index : indexes) { - all.insert(index); - } - for (const DiskIndex::LookupResult & lr : result) { - all.insert(lr.indexId); - } - DiskIndex::IndexList v; - v.reserve(all.size()); - for (uint32_t indexId : all) { - v.push_back(indexId); - } - return v; -} - -} - -DiskIndex::LookupResultVector -DiskIndex::lookup(const std::vector & indexes, std::string_view word) -{ - Key key(indexes, word); - LookupResultVector result; - if (_dictionary_cache_size > 0) { - result = _cache.read(key); - if (!containsAll(indexes, result)) { - key = Key(unite(indexes, result), word); - _cache.invalidate(key); - result = _cache.read(key); - } + if (index < _field_indexes.size()) { + return _field_indexes[index].lookup(word); } else { - read(key, result); - } - return result; -} - -bool -DiskIndex::read(const Key & key, LookupResultVector & result) -{ - uint64_t wordNum(0); - const IndexList & indexes(key.getIndexes()); - result.resize(indexes.size()); - for (size_t i(0); i < result.size(); i++) { - LookupResult & lr(result[i]); - lr.indexId = indexes[i]; - PostingListOffsetAndCounts offsetAndCounts; - wordNum = 0; - SchemaUtil::IndexIterator it(_schema, lr.indexId); - uint32_t fieldId = it.getIndex(); - if (fieldId < _field_indexes.size()) { - (void) _field_indexes[fieldId].get_dictionary()->lookup(key.getWord(), wordNum,offsetAndCounts); - } - lr.wordNum = wordNum; - lr.counts.swap(offsetAndCounts._counts); - lr.bitOffset = offsetAndCounts._offset; + return {}; } - return true; } namespace { @@ -256,65 +150,32 @@ DiskIndex::calculate_nonfield_size_on_disk() namespace { -DiskIndex::LookupResult G_nothing; - -class LookupCache { -public: - LookupCache(DiskIndex & diskIndex, const std::vector & fieldIds) - : _diskIndex(diskIndex), - _fieldIds(fieldIds), - _cache() - { } - const DiskIndex::LookupResult & - lookup(const std::string & word, uint32_t fieldId) { - auto it = _cache.find(word); - if (it == _cache.end()) { - _cache[word] = _diskIndex.lookup(_fieldIds, word); - it = _cache.find(word); - } - for (const auto & result : it->second) { - if (result.indexId == fieldId) { - return result; - } - } - return G_nothing; - } -private: - - using Cache = vespalib::hash_map; - DiskIndex & _diskIndex; - const std::vector & _fieldIds; - Cache _cache; -}; - class CreateBlueprintVisitor : public CreateBlueprintVisitorHelper { private: - LookupCache &_cache; DiskIndex &_diskIndex; + const FieldIndex &_field_index; const FieldSpec &_field; - const uint32_t _fieldId; public: - CreateBlueprintVisitor(LookupCache & cache, DiskIndex &diskIndex, + CreateBlueprintVisitor(DiskIndex& diskIndex, const IRequestContext & requestContext, const FieldSpec &field, uint32_t fieldId) : CreateBlueprintVisitorHelper(diskIndex, field, requestContext), - _cache(cache), _diskIndex(diskIndex), - _field(field), - _fieldId(fieldId) + _field_index(_diskIndex.get_field_index(fieldId)), + _field(field) { } template void visitTerm(TermNode &n) { const std::string termStr = termAsString(n); - const DiskIndex::LookupResult & lookupRes = _cache.lookup(termStr, _fieldId); - if (lookupRes.valid()) { + auto lookup_result = _field_index.lookup(termStr); + if (lookup_result.valid()) { double bitvector_limit = getRequestContext().get_create_blueprint_params().disk_index_bitvector_limit; setResult(std::make_unique - (_field, _diskIndex.get_field_index(_fieldId), termStr, lookupRes, _field.isFilter(), bitvector_limit)); + (_field, _field_index, termStr, lookup_result, _field.isFilter(), bitvector_limit)); } else { setResult(std::make_unique(_field)); } @@ -339,11 +200,11 @@ class CreateBlueprintVisitor : public CreateBlueprintVisitorHelper { }; Blueprint::UP -createBlueprintHelper(LookupCache & cache, DiskIndex & diskIndex, const IRequestContext & requestContext, +createBlueprintHelper(DiskIndex & diskIndex, const IRequestContext & requestContext, const FieldSpec &field, uint32_t fieldId, const Node &term) { if (fieldId != Schema::UNKNOWN_FIELD_ID) { - CreateBlueprintVisitor visitor(cache, diskIndex, requestContext, field, fieldId); + CreateBlueprintVisitor visitor(diskIndex, requestContext, field, fieldId); const_cast(term).accept(visitor); return visitor.getResult(); } @@ -357,8 +218,7 @@ DiskIndex::createBlueprint(const IRequestContext & requestContext, const FieldSp { std::vector fieldIds; fieldIds.push_back(_schema.getIndexFieldId(field.getName())); - LookupCache cache(*this, fieldIds); - return createBlueprintHelper(cache, *this, requestContext, field, fieldIds[0], term); + return createBlueprintHelper(*this, requestContext, field, fieldIds[0], term); } Blueprint::UP @@ -378,10 +238,9 @@ DiskIndex::createBlueprint(const IRequestContext & requestContext, const FieldSp } } auto orbp = std::make_unique(); - LookupCache cache(*this, fieldIds); for (size_t i(0); i< fields.size(); i++) { const FieldSpec & field = fields[i]; - orbp->addChild(createBlueprintHelper(cache, *this, requestContext, field, _schema.getIndexFieldId(field.getName()), term)); + orbp->addChild(createBlueprintHelper(*this, requestContext, field, _schema.getIndexFieldId(field.getName()), term)); } if (orbp->childCnt() == 1) { return orbp->removeChild(0); diff --git a/searchlib/src/vespa/searchlib/diskindex/diskindex.h b/searchlib/src/vespa/searchlib/diskindex/diskindex.h index 132666b9558e..1001a4a890f4 100644 --- a/searchlib/src/vespa/searchlib/diskindex/diskindex.h +++ b/searchlib/src/vespa/searchlib/diskindex/diskindex.h @@ -6,7 +6,6 @@ #include #include #include -#include #include namespace search::diskindex { @@ -15,55 +14,12 @@ namespace search::diskindex { * This class represents a disk index that contains a set of field indexes that are independent of each other. */ class DiskIndex : public queryeval::Searchable { -public: - /** - * The result after performing a disk dictionary lookup. - **/ - struct LookupResult : public search::index::DictionaryLookupResult { - uint32_t indexId; - LookupResult() noexcept; - void swap(LookupResult & rhs) noexcept { - DictionaryLookupResult::swap(rhs); - std::swap(indexId , rhs.indexId); - } - }; - using LookupResultVector = std::vector; - using IndexList = std::vector; - - class Key { - public: - Key() noexcept; - Key(IndexList indexes, std::string_view word) noexcept; - Key(const Key &); - Key & operator = (const Key &); - Key(Key &&) noexcept = default; - Key & operator = (Key &&) noexcept = default; - ~Key(); - uint32_t hash() const noexcept { - return vespalib::hashValue(_word.c_str(), _word.size()); - } - bool operator == (const Key & rhs) const noexcept { - return _word == rhs._word; - } - void push_back(uint32_t indexId) { _indexes.push_back(indexId); } - const IndexList & getIndexes() const noexcept { return _indexes; } - const std::string & getWord() const noexcept { return _word; } - private: - std::string _word; - IndexList _indexes; - }; - -private: - using Cache = vespalib::cache, DiskIndex>>; - std::string _indexDir; - size_t _dictionary_cache_size; index::Schema _schema; std::vector _field_indexes; uint32_t _nonfield_size_on_disk; TuneFileSearch _tuneFileSearch; std::shared_ptr _posting_list_cache; - Cache _cache; void calculate_nonfield_size_on_disk(); bool loadSchema(); @@ -74,10 +30,9 @@ class DiskIndex : public queryeval::Searchable { * Create a view of the disk index located in the given directory. * * @param indexDir the directory where the disk index is located. - * @param dictionary_cache_size optional size (in bytes) of the disk dictionary lookup cache. + * @param posting_list_cache cache for posting lists and bitvectors. */ - explicit DiskIndex(const std::string &indexDir, std::shared_ptr posting_list_cache, - size_t dictionary_cache_size = 0); + explicit DiskIndex(const std::string &indexDir, std::shared_ptr posting_list_cache); ~DiskIndex() override; /** @@ -95,9 +50,7 @@ class DiskIndex : public queryeval::Searchable { * @param word the word to lookup. * @return the lookup result or nullptr if the word is not found. */ - LookupResult lookup(uint32_t indexId, std::string_view word); - - LookupResultVector lookup(const std::vector & indexes, std::string_view word); + index::DictionaryLookupResult lookup(uint32_t indexId, std::string_view word); std::unique_ptr createBlueprint(const queryeval::IRequestContext & requestContext, const queryeval::FieldSpec &field, @@ -114,16 +67,9 @@ class DiskIndex : public queryeval::Searchable { const index::Schema &getSchema() const { return _schema; } const std::string &getIndexDir() const { return _indexDir; } - /** - * Needed for the Cache::BackingStore interface. - */ - bool read(const Key & key, LookupResultVector & result); - index::FieldLengthInfo get_field_length_info(const std::string& field_name) const; const std::shared_ptr& get_posting_list_cache() const noexcept { return _posting_list_cache; } const FieldIndex& get_field_index(uint32_t field_id) const noexcept { return _field_indexes[field_id]; } }; -void swap(DiskIndex::LookupResult & a, DiskIndex::LookupResult & b); - } diff --git a/searchlib/src/vespa/searchlib/diskindex/field_index.cpp b/searchlib/src/vespa/searchlib/diskindex/field_index.cpp index c7a550ac19fc..1fe90d1131b3 100644 --- a/searchlib/src/vespa/searchlib/diskindex/field_index.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/field_index.cpp @@ -16,6 +16,7 @@ LOG_SETUP(".diskindex.field_index"); using search::index::BitVectorDictionaryLookupResult; using search::index::DictionaryLookupResult; using search::index::PostingListHandle; +using search::index::PostingListOffsetAndCounts; namespace search::diskindex { @@ -172,6 +173,17 @@ FieldIndex::reuse_files(const FieldIndex& rhs) _io_stats = rhs._io_stats; } +DictionaryLookupResult +FieldIndex::lookup(std::string_view word) const +{ + DictionaryLookupResult lookup_result; + PostingListOffsetAndCounts offsetAndCounts; + _dict->lookup(word, lookup_result.wordNum,offsetAndCounts); + lookup_result.counts.swap(offsetAndCounts._counts); + lookup_result.bitOffset = offsetAndCounts._offset; + return lookup_result; +} + PostingListHandle FieldIndex::read_uncached_posting_list(const DictionaryLookupResult& lookup_result, bool trim) const { diff --git a/searchlib/src/vespa/searchlib/diskindex/field_index.h b/searchlib/src/vespa/searchlib/diskindex/field_index.h index 303213ab4521..7e8db1bca2af 100644 --- a/searchlib/src/vespa/searchlib/diskindex/field_index.h +++ b/searchlib/src/vespa/searchlib/diskindex/field_index.h @@ -73,6 +73,7 @@ class FieldIndex : public IPostingListCache::IPostingListFileBacking { bool open_dictionary(const std::string& field_dir, const TuneFileSearch& tune_file_search); bool open(const std::string& field_dir, const TuneFileSearch &tune_file_search); void reuse_files(const FieldIndex& rhs); + index::DictionaryLookupResult lookup(std::string_view word) const; index::PostingListHandle read_uncached_posting_list(const search::index::DictionaryLookupResult &lookup_result, bool trim) const; index::PostingListHandle read(const IPostingListCache::Key& key, IPostingListCache::Context& ctx) const override;