Skip to content

Commit

Permalink
chore: Added a test case for query using nested prefetch in congruenc…
Browse files Browse the repository at this point in the history
…e tests
  • Loading branch information
hh-space-invader committed Sep 13, 2024
1 parent c9a3a01 commit 94024e1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/congruence_tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,23 @@ def deep_dense_queries_orderby(self, client: QdrantBase) -> models.QueryResponse
limit=10,
)

def dense_query_text_nested_prefetch(self, client: QdrantBase) -> models.QueryResponse:
return client.query_points(
collection_name=COLLECTION_NAME,
prefetch=[
models.Prefetch(
prefetch=models.Prefetch(
query=self.dense_vector_query_text,
using="text"
),
query=self.dense_vector_query_text,
using="text"
),
],
query=self.dense_vector_query_text,
using="text"
)

@classmethod
def dense_recommend_image(cls, client: QdrantBase) -> models.QueryResponse:
return client.query_points(
Expand Down Expand Up @@ -814,6 +831,20 @@ def test_no_query_no_prefetch():
compare_clients_results(http_client, grpc_client, grpc_client, searcher.query_scroll_offset)


def test_dense_query_nested_prefetch():
major, minor, patch, dev = read_version()
if not dev and None not in (major, minor, patch) and (major, minor, patch) < (1, 10, 0):
pytest.skip("Works as of version 1.10.0")

fixture_points = generate_fixtures()

searcher = TestSimpleSearcher()

local_client, http_client, grpc_client = init_clients(fixture_points)

compare_clients_results(local_client, http_client, grpc_client, searcher.dense_query_text_nested_prefetch)


def test_dense_query_filtered_prefetch():
fixture_points = generate_fixtures()

Expand Down

0 comments on commit 94024e1

Please sign in to comment.