younifyd
Menu

Query points, grouped by a given payload field

Query points, grouped by a given payload field

POST/collections/{collection_name}/points/query/groups

Use it in a workflow

  1. Add a step and choose the Qdrant connector.
  2. Pick the Query points, grouped by a given payload field action (under Search).
  3. Fill in the fields below, then reference the result from later steps as {{queryPointsGroupedByAGivenPayloadField.response.data}}.

Request

Path parameters

collection_namestringrequired

Name of the collection to query

Query parameters

consistencyoneOf

Define read consistency guarantees for the operation

timeoutinteger

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

Request body

Enter the body as JSON in the step's Body field.

shard_keyoneOf
prefetchoneOf

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

Default null

queryoneOf

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

usingstring

Define which vector name to use for querying. If missing, the default vector is used. For a `text` query, the payload field whose text index to search.

filteroneOf

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

paramsoneOf

Search params for when there is no prefetch

score_thresholdnumber (float)

Return points with scores better than this threshold.

with_vectoroneOf

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

with_payloadoneOf

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

lookup_fromoneOf

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

Default null

group_bystringrequired

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_sizeinteger (uint)

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

limitinteger (uint)

Maximum amount of groups to return. Default is 10.

with_lookuponeOf

Look for points in another collection using the group ids

json
{
  "group_by": "string",
  "shard_key": null,
  "prefetch": null,
  "query": null,
  "using": "string",
  "filter": null,
  "params": null,
  "score_threshold": 0,
  "with_vector": null,
  "with_payload": null,
  "lookup_from": null,
  "group_size": 0
}

Response

Returns 200 with an object. Read it in later steps with {{queryPointsGroupedByAGivenPayloadField.response.data.<field>}}.

usageoneOf

Default null

timenumber (float)

Time spent to process this request

statusstring
resultobject
groupsarray<object>required3 fields
json
{
  "usage": null,
  "time": 0.002,
  "status": "ok",
  "result": {
    "groups": [
      {
        "hits": [
          {
            "id": null,
            "version": 3,
            "score": 0.75,
            "payload": null,
            "vector": null,
            "shard_key": null,
            "order_value": null
          }
        ],
        "id": null,
        "lookup": null
      }
    ]
  }
}

Need more? See the Qdrant guide for connection setup and behaviour shared by every action.