summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-06-13 13:21:58 +0200
committerGitHub <noreply@github.com>2022-06-13 13:21:58 +0200
commit728487b2d7a8bacca478840feef908523159b4bb (patch)
treeeae871410e6dca876df2d393b4620611ee520668 /searchlib/src/tests/attribute
parent9ed4500b380ce77c1dc9f303006c02ba8096ee42 (diff)
Revert "Don't make changes to the hnsw index when the inserted tensor is unchanged"
Diffstat (limited to 'searchlib/src/tests/attribute')
-rw-r--r--searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
index 72b2f1e320a..bf0b74b0003 100644
--- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
+++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp
@@ -157,12 +157,6 @@ public:
void expect_empty_add() const {
EXPECT_TRUE(_adds.empty());
}
- void expect_empty_prepare_add() const {
- EXPECT_TRUE(_prepare_adds.empty());
- }
- void expect_empty_complete_add() const {
- EXPECT_TRUE(_complete_adds.empty());
- }
void expect_entry(uint32_t exp_docid, const DoubleVector& exp_vector, const EntryVector& entries) const {
EXPECT_EQUAL(1u, entries.size());
EXPECT_EQUAL(exp_docid, entries.back().first);
@@ -887,30 +881,6 @@ TEST_F("nearest neighbor index can be updated in two phases", DenseTensorAttribu
}
}
-TEST_F("nearest neighbor index is NOT updated when tensor value is unchanged", DenseTensorAttributeMockIndex)
-{
- auto& index = f.mock_index();
- {
- auto vec_a = vec_2d(3, 5);
- auto prepare_result = f.prepare_set_tensor(1, vec_a);
- index.expect_prepare_add(1, {3, 5});
- f.complete_set_tensor(1, vec_a, std::move(prepare_result));
- f.assertGetTensor(vec_a, 1);
- index.expect_complete_add(1, {3, 5});
- }
- index.clear();
- {
- // Replaces previous value with the same value
- auto vec_b = vec_2d(3, 5);
- auto prepare_result = f.prepare_set_tensor(1, vec_b);
- EXPECT_TRUE(prepare_result.get() == nullptr);
- index.expect_empty_prepare_add();
- f.complete_set_tensor(1, vec_b, std::move(prepare_result));
- f.assertGetTensor(vec_b, 1);
- index.expect_empty_complete_add();
- }
-}
-
TEST_F("clearDoc() updates nearest neighbor index", DenseTensorAttributeMockIndex)
{
auto& index = f.mock_index();