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

Distance matrix pairs

POST
/collections/:collection_name/points/search/matrix/pairs
POST
/collections/:collection_name/points/search/matrix/pairs
$curl -X POST http://localhost:6333/collections/collection_name/points/search/matrix/pairs \
> -H "api-key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{
2 "time": 0.002,
3 "status": "ok",
4 "result": {
5 "pairs": [
6 {
7 "a": 42,
8 "b": 42,
9 "score": 1.1
10 }
11 ]
12 }
13}
Retrieves sparse matrix of pairwise distances between points sampled from the collection. Output is a list of pairs of points and their distances.
Was this page helpful?
Previous

Distance matrix offsets

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 matrix request with optional filtering
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
sampleinteger or nullOptional>=2
How many points to select and search within. Default is 10.
limitinteger or nullOptional>=1
How many neighbours per sample to find. Default is 3.
usingstring or nullOptional
Define which vector name to use for querying. If missing, the default vector is used.

Response

successful operation
timedouble
Time spent to process this request
statusstring
resultobject