diff options
author | Geir Storli <geirst@oath.com> | 2017-09-06 15:44:04 +0000 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2017-09-06 15:45:26 +0000 |
commit | 4119e49f014b01395fe67b9d95e4fd3b1616ca3d (patch) | |
tree | b7c26e40f4adcd7779868328a0b36becf80f0dc1 /searchlib | |
parent | 9a2a64a3bd9a20ce2e5697a450ce5bc4896179b1 (diff) |
Make AttributeWriter::forceCommit() clear the search cache of all imported attribute vectors.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.cpp | 6 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.cpp b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.cpp index 0ec65f60d41..9efac9ce541 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.cpp @@ -145,6 +145,12 @@ bool ImportedAttributeVector::hasEnum() const { return _target_attribute->hasEnum(); } +void ImportedAttributeVector::clearSearchCache() { + if (_search_cache) { + _search_cache->clear(); + } +} + long ImportedAttributeVector::onSerializeForAscendingSort(DocId doc, void *serTo, long available, diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h index 568c0ff4cce..c94eda3d4db 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h @@ -75,6 +75,7 @@ public: const std::shared_ptr<BitVectorSearchCache> &getSearchCache() const { return _search_cache; } + void clearSearchCache(); /* * Create an imported attribute with a snapshot of lid to lid mapping. |