For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CloudGitHub
  • API Reference
      • POSTSearch points
      • POSTSearch batch points
      • POSTSearch point groups
      • POSTRecommend points
      • POSTRecommend batch points
      • POSTRecommend point groups
      • POSTDiscover points
      • POSTDiscover batch points
      • POSTQuery points
      • POSTQuery points in batch
      • POSTQuery point groups
      • POSTDistance matrix pairs
      • POSTDistance matrix offsets
LogoLogo
CloudGitHub
API ReferenceSearch

Search point groups

Deprecated
POST
/collections/:collection_name/points/search/groups
POST
/collections/:collection_name/points/search/groups
$curl -X POST \
> 'http://localhost:6333/collections/collection_name/points/search/groups' \
> --header 'api-key: <api-key-value>' \
> --header 'Content-Type: application/json' \
> --data-raw '{
> "vector": [
> 0.2,
> 0.1,
> 0.9,
> 0.7
> ],
> "group_by": "document_id",
> "limit": 4,
> "group_size": 2
>}'
200Successful
1{
2 "usage": {
3 "cpu": 1,
4 "payload_io_read": 1,
5 "payload_io_write": 1,
6 "payload_index_io_read": 1,
7 "payload_index_io_write": 1,
8 "vector_io_read": 1,
9 "vector_io_write": 1
10 },
11 "time": 0.002,
12 "status": "ok",
13 "result": {
14 "groups": [
15 {
16 "hits": [
17 {
18 "id": 42,
19 "version": 3,
20 "score": 0.75,
21 "payload": {},
22 "vector": {},
23 "shard_key": "region_1",
24 "order_value": 42
25 }
26 ],
27 "id": "string",
28 "lookup": {
29 "id": 42,
30 "payload": {},
31 "vector": {},
32 "shard_key": "region_1",
33 "order_value": 42
34 }
35 }
36 ]
37 }
38}
Retrieves the closest points based on vector similarity and given filtering conditions, grouped by a given payload field.
Was this page helpful?
Previous

Recommend points

Next
Built with

Authentication

api-keystring
API Key authentication via header

Path parameters

collection_namestringRequired
Name of the collection to search in

Query parameters

consistencyinteger or enumOptional
Define read consistency guarantees for the operation
timeoutintegerOptional>=1
If set, overrides global timeout for this request. Unit is seconds.

Request

Search request with optional filtering, grouped by a given payload field
vectorlist of doubles or objectRequired

Vector data separator for named and unnamed modes Unnamed mode:

{ “vector”: [1.0, 2.0, 3.0] }

or named mode:

{ “vector”: { “vector”: [1.0, 2.0, 3.0], “name”: “image-embeddings” } }

group_bystringRequired>=1 character
Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.
group_sizeuintRequired
Maximum amount of points to return per group
limituintRequired
Maximum amount of groups to return
shard_keystring or uint64 or list of strings or uint64s or anyOptional

Specify in which shards to look for the points, if not specified - look in all shards

filterobject or anyOptional
Look only for points which satisfies this conditions
paramsobject or anyOptional
Additional search params
with_payloadboolean or list of strings or object or anyOptional
Select which payload to return with the response. Default is false.
with_vectorboolean or list of strings or anyOptional
Options for specifying which vectors to include into response. Default is false.
score_thresholddouble or nullOptional
Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.
with_lookupstring or object or anyOptional
Look for points in another collection using the group ids

Response

successful operation
usageobject or any
timedouble
Time spent to process this request
statusstring
resultobject