Collections
All operations related to collections
Get all collections
Get all collections and their configurations
Returns a list of Collections along with their configurations.
Returns a bad request error.
GET /collections HTTP/1.1
Host:
Accept: */*
[
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
]
Get a collection
Get a specific collection and it's configuration using it's id or name.
Returns the Collection information.
Returns a bad request error.
GET /collections/{collectionIdOrName} HTTP/1.1
Host:
Accept: */*
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Create a collection
^[a-zA-Z0-9_-]+$
Returns the created Collection information.
Returns a bad request error.
POST /collections HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
}
}
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Delete a collection
Delete an existing collection using it's name or id.
Returns the deleted Collection.
Returns a bad request error.
DELETE /collections/{collectionIdOrName} HTTP/1.1
Host:
Accept: */*
{
"deleted": {
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
}
Update a collection
Update details of an existing collection.
^[a-zA-Z0-9_-]+$
Returns the updated collection information.
Returns a bad request error.
POST /collections/{collectionId} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"name": "text",
"description": "text"
}
{
"name": "text",
"description": "text",
"config": {
"dim": 1,
"m": 1,
"efConstruction": 1,
"ef": 1,
"model": "text",
"algo": "text",
"allowReplace": true
},
"id": "text"
}
Query a collection for a vector value
Search a collection using a query vector. It retrieves the vectors that are most similar to the queried vector, along with their similarity scores.
Returns a list of the matching Vectors in a Collection.
Returns a bad request error.
POST /collections/{collectionId}/query HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"vectors": [
[
1
]
],
"limit": 1
}
[
[
{
"id": "text",
"content": "text",
"metadata": null,
"distance": 1
}
]
]
Query a collection for a text
Search a collection using a text. It retrieves the vectors that are most similar to the queried text, along with their similarity scores.
Returns a list of the matching Vectors in a Collection.
Returns a bad request error.
POST /collections/{collectionId}/query/text HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"content": [
"text"
],
"topK": 1
}
[
[
{
"id": "text",
"content": "text",
"metadata": null,
"distance": 1
}
]
]
Last updated