v17

latestOpenAPI 3.0.1Apache 2.0raw.githubusercontent.com2026-05-2575397522.8 KB
Search

Discover points

Use context and a target to find the most similar points to the target, constrained by the context. When using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair. Since the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0. When using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.

post/collections/{collection_name}/points/discover

Path parameters

collection_namestring required

Name of the collection to search in

Query parameters

integer
OR
'majority' | 'quorum' | 'all'
  • majority - send N/2+1 random request and return points, which present on all of them

  • quorum - send requests to all nodes and return points which present on majority of nodes

  • all - send requests to all nodes and return points which present on all nodes

Define read consistency guarantees for the operation

timeoutinteger

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

Request body

limitinteger required

Max number of result to return

offsetinteger nullable

Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.

Response

successful operation

timenumber float

Time spent to process this request

statusstring

Example response

{
  "time": 0.002,
  "status": "ok",
  "result": [
    {
      "id": 42,
      "version": 3,
      "score": 0.75,
      "payload": {
        "city": "London",
        "color": "green"
      },
      "vector": [
        0.875,
        0.140625,
        0.897599995136261
      ],
      "shard_key": "region_1",
      "order_value": 42
    }
  ]
}