Skip to content

Commit c701285

Browse files
authored
fix: propagate lookup from correctly in query_points_groups (#1133)
* fix: propagate lookup from correctly in query_points_groups * tests: add test from lookup_from
1 parent a8beff7 commit c701285

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

qdrant_client/async_qdrant_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ async def query_points_groups(
571571
score_threshold=score_threshold,
572572
using=using,
573573
with_lookup=with_lookup,
574+
lookup_from=lookup_from,
574575
consistency=consistency,
575576
shard_key_selector=shard_key_selector,
576577
timeout=timeout,

qdrant_client/qdrant_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ def query_points_groups(
599599
score_threshold=score_threshold,
600600
using=using,
601601
with_lookup=with_lookup,
602+
lookup_from=lookup_from,
602603
consistency=consistency,
603604
shard_key_selector=shard_key_selector,
604605
timeout=timeout,

tests/congruence_tests/test_query.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,18 @@ def dense_query_group_with_lookup(self, client: QdrantBase) -> GroupsResult:
240240
with_lookup=SECONDARY_COLLECTION_NAME,
241241
)
242242

243+
def dense_query_group_with_lookup_from(self, client: QdrantBase) -> GroupsResult:
244+
return client.query_points_groups(
245+
collection_name=COLLECTION_NAME,
246+
query=1,
247+
using="text",
248+
group_by=self.group_by,
249+
group_size=self.group_size,
250+
limit=self.limit,
251+
with_payload=models.PayloadSelectorInclude(include=[self.group_by]),
252+
lookup_from=models.LookupLocation(collection=SECONDARY_COLLECTION_NAME, vector="text"),
253+
)
254+
243255
def filter_dense_query_group(
244256
self, client: QdrantBase, query_filter: models.Filter
245257
) -> GroupsResult:
@@ -1690,6 +1702,10 @@ def test_query_group():
16901702
compare_clients_results(
16911703
local_client, http_client, grpc_client, searcher.dense_query_group_with_lookup
16921704
)
1705+
compare_clients_results(
1706+
local_client, http_client, grpc_client, searcher.dense_query_group_with_lookup_from
1707+
)
1708+
16931709
compare_clients_results(
16941710
local_client, http_client, grpc_client, searcher.dense_queries_rescore_group
16951711
)

0 commit comments

Comments
 (0)