Skip to content

Commit 63bbb5b

Browse files
committed
wip
1 parent 07f1a15 commit 63bbb5b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Dense/Operations/DeleteVectorsOperationTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ public function test_delete_vectors_from_a_query_result_results(): void
5555
$this->assertEquals(2, $result->deleted);
5656
}
5757

58+
public function test_delete_vectors_using_builder_pattern(): void
59+
{
60+
$this->namespace->upsertMany([
61+
new VectorUpsert('users:1', vector: createRandomVector(2)),
62+
new VectorUpsert('users:2', vector: createRandomVector(2)),
63+
new VectorUpsert('posts:1', vector: createRandomVector(2)),
64+
]);
65+
$this->waitForIndex($this->namespace);
66+
67+
$result = $this->namespace->delete(VectorDelete::fromIds(['users:1', 'users:2']));
68+
69+
$this->assertEquals(2, $result->deleted);
70+
$this->assertEquals(1, $this->namespace->getNamespaceInfo()->vectorCount);
71+
}
72+
5873
public function test_delete_vectors_using_an_id_prefix(): void
5974
{
6075
$this->namespace->upsertMany([

0 commit comments

Comments
 (0)