diff options
author | Geir Storli <geirst@verizonmedia.com> | 2020-06-19 12:13:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2020-06-19 12:13:29 +0000 |
commit | c56ffa5e2735b6e3873aa18edc5e54a9128f3108 (patch) | |
tree | b64c3bbc9cee9bd5b0900bfe51cac5a4686c08f6 /searchcore/src | |
parent | cdc65c6b2b0734fb97b7f466ba0139ce6406559c (diff) |
Wire flag to enable multi-threaded indexing for a hnsw index.
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/tests/proton/attribute/attribute_test.cpp | 8 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp index 91f580cd221..dabab649497 100644 --- a/searchcore/src/tests/proton/attribute/attribute_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp @@ -811,18 +811,18 @@ public: const vespalib::string dense_tensor = "tensor(x[2])"; AVConfig -get_tensor_config(bool allow_multi_threaded_indexing) +get_tensor_config(bool multi_threaded_indexing) { AVConfig cfg(AVBasicType::TENSOR); cfg.setTensorType(ValueType::from_spec(dense_tensor)); - cfg.set_hnsw_index_params(HnswIndexParams(4, 4, DistanceMetric::Euclidean, allow_multi_threaded_indexing)); + cfg.set_hnsw_index_params(HnswIndexParams(4, 4, DistanceMetric::Euclidean, multi_threaded_indexing)); return cfg; } std::shared_ptr<MockDenseTensorAttribute> -make_mock_tensor_attribute(const vespalib::string& name, bool allow_multi_threaded_indexing) +make_mock_tensor_attribute(const vespalib::string& name, bool multi_threaded_indexing) { - auto cfg = get_tensor_config(allow_multi_threaded_indexing); + auto cfg = get_tensor_config(multi_threaded_indexing); return std::make_shared<MockDenseTensorAttribute>(name, cfg); } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index 8f19d5c203b..9b54ae816e0 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -40,7 +40,7 @@ use_two_phase_put_for_attribute(const AttributeVector& attr) const auto& cfg = attr.getConfig(); if (cfg.basicType() == search::attribute::BasicType::Type::TENSOR && cfg.hnsw_index_params().has_value() && - cfg.hnsw_index_params().value().allow_multi_threaded_indexing()) + cfg.hnsw_index_params().value().multi_threaded_indexing()) { return true; } |