Skip to content

Commit

Permalink
tests: add has vector multivector test
Browse files Browse the repository at this point in the history
  • Loading branch information
joein committed Jan 5, 2025
1 parent c456bc5 commit b78862a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/congruence_tests/test_has_vector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from qdrant_client import models

from tests.congruence_tests.test_common import (
COLLECTION_NAME,
compare_client_results,
Expand All @@ -8,6 +9,8 @@
init_client,
init_remote,
sparse_vectors_config,
generate_multivector_fixtures,
multi_vector_config,
)


Expand Down Expand Up @@ -54,3 +57,29 @@ def test_has_vector_sparse():
),
)[0],
)


def test_has_vector_multi():
points = generate_multivector_fixtures(100, skip_vectors=True)

local_client = init_local()
init_client(local_client, [], vectors_config=multi_vector_config)

remote_client = init_remote()
init_client(remote_client, [], vectors_config=multi_vector_config)

local_client.upload_points(COLLECTION_NAME, points)
remote_client.upload_points(COLLECTION_NAME, points, wait=True)

local_client.upload_points(COLLECTION_NAME, points)
remote_client.upload_points(COLLECTION_NAME, points, wait=True)

compare_client_results(
local_client,
remote_client,
lambda c: c.scroll(
COLLECTION_NAME,
limit=50,
scroll_filter=models.Filter(must=[models.HasVectorCondition(has_vector="multi-code")]),
)[0],
)

0 comments on commit b78862a

Please sign in to comment.