fix lookup api code bit

This commit is contained in:
David Sertic
2023-06-26 12:21:11 +02:00
parent ec3524380b
commit 73fbe2342c
@@ -122,24 +122,29 @@ When using the grouping API, add the `with_lookup` parameter to bring the inform
```http ```http
POST /collections/chunks/points/search/groups POST /collections/chunks/points/search/groups
{ {
// Same as in the regular search API // Same as in the regular search API
"vector": [1.1], "vector": [1.1],
..., ...,
// Grouping parameters // Grouping parameters
"group_by": "document_id", "group_by": "document_id",
"limit": 2, "limit": 2,
"group_size": 2, "group_size": 2,
// Lookup parameters // Lookup parameters
"with_lookup": { "with_lookup": {
// Name of the collection to look up points in // Name of the collection to look up points in
"collection_name": "documents", "collection_name": "documents",
// Options for specifying what to bring from the payload // Options for specifying what to bring from the payload
// of the looked up point, true by default // of the looked up point, true by default
"with_payload": ["title", "text"], "with_payload": ["title", "text"],
// Options for specifying what to bring from the vector(s) // Options for specifying what to bring from the vector(s)
// of the looked up point, false by default // of the looked up point, true by default
"with_vector: false, "with_vectors: false,
} }
} }
``` ```
@@ -149,9 +154,9 @@ client.search_groups(
collection_name="chunks", collection_name="chunks",
# Same as in the regular search() API # Same as in the regular search() API
vector=[1.1], query_vector=[1.1],
..., ...,
# Grouping parameters # Grouping parameters
group_by="document_id", # Path of the field to group by group_by="document_id", # Path of the field to group by
limit=2, # Max amount of groups limit=2, # Max amount of groups
@@ -165,10 +170,10 @@ client.search_groups(
# Options for specifying what to bring from the payload # Options for specifying what to bring from the payload
# of the looked up point, True by default # of the looked up point, True by default
with_payload=["title", "text"] with_payload=["title", "text"]
# Options for specifying what to bring from the vector(s) # Options for specifying what to bring from the vector(s)
# of the looked up point, False by default # of the looked up point, True by default
with_vector=False, with_vectors=False,
) )
) )
``` ```