Query point groups

POST

Universally query points and group results by a specified payload field. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.

Path parameters

collection_namestringRequired

Name of the collection to query

Query parameters

consistencyinteger or enumOptional

Define read consistency guarantees for the operation

timeoutintegerOptional

If set, overrides global timeout for this request. Unit is seconds.

Request

This endpoint expects an object.
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.

shard_keystring or uint64 or list of strings or uint64s or anyOptional
prefetchobject or list of objects or anyOptional

Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).

querylist of doubles or object or list of lists of doubles or uint64 or string or object or anyOptional

Query to perform. If missing without prefetches, returns points ordered by their IDs.

usingstringOptional

Define which vector name to use for querying. If missing, the default vector is used.

filterobject or anyOptional

Filter conditions - return only those points that satisfy the specified conditions.

paramsobject or anyOptional

Search params for when there is no prefetch

score_thresholddoubleOptional

Return points with scores better than this threshold.

with_vectorboolean or list of strings or anyOptional

Options for specifying which vectors to include into the response. Default is false.

with_payloadboolean or list of strings or object or anyOptional

Options for specifying which payload to include or not. Default is false.

lookup_fromobject or anyOptional

The location to use for IDs lookup, if not specified - use the current collection and the ‘using’ vector Note: the other collection vectors should have the same vector size as the ‘using’ vector in the current collection

group_sizeintegerOptional>=1

Maximum amount of points to return per group. Default is 3.

limitintegerOptional>=1

Maximum amount of groups to return. Default is 10.

with_lookupstring or object or anyOptional

Look for points in another collection using the group ids

Response

successful operation

timedoubleOptional

Time spent to process this request

statusstringOptional
resultobjectOptional