Discover points

POST

Retrieves the most similar points to a given target, constrained by the provided context. Context Search: When only the context is provided (without a target), pairs of points are used to generate a loss that guides the search towards the area where most positive examples overlap. The score minimizes finding points closer to a negative example than to a positive example. The maximum score a point can achieve is 0.0, meaning many points may have a score of 0.0. Target Search: When a target is provided (with or without context), the score consists of two parts: the integer part represents the rank with respect to the context, and the decimal part relates to the distance to the target. The context score for each pair is +1 if the point is closer to a positive example than to a negative example, and -1 otherwise.

Path parameters

collection_namestringRequired

Name of the collection to search in

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.
limitintegerRequired>=1

Max number of result 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

targetuint64 or string or list of doubles or object or anyOptional

Look for vectors closest to this.

When using the target (with or without context), 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.

contextlist of objectsOptional

Pairs of { positive, negative } examples to constrain the search.

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.

For discovery search (when including a 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.

filterobject or anyOptional

Look only for points which satisfies this conditions

paramsobject or anyOptional

Additional search params

offsetintegerOptional>=0

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

with_payloadboolean or list of strings or object or anyOptional

Select which payload to return with the response. Default: None

with_vectorboolean or list of strings or anyOptional

Whether to return the point vector with the result?

usingstring or anyOptional

Define which vector to use for recommendation, if not specified - try to use default vector

lookup_fromobject or anyOptional

The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection

Response

successful operation

timedoubleOptional

Time spent to process this request

statusstringOptional
resultlist of objectsOptional