Search collection
POST/api/v1/collections/:collection-id/search
Perform a search in a collection.
Request
Path Parameters
Collection ID
- application/json
Body
Search query text
Default value: 0.65
Maximum similarity distance for the search results. Must be between 0 and 1.
Default value: 5
Maximum number of search results
Responses
- 200
- 401
- 403
- 404
Successful response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
result
object[]
required
Search results consisting of chunks
Chunk ID
Chunk content in plain text
File ID which the chunk is part of
A value representing a similarity distance between query and result, smaller values means more similar.
{
"result": [
{
"id": "string",
"content": "string",
"file_id": "string",
"distance": 0,
"score": 0
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}
Not found
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
Human readable error message
Further details on the error
{
"error": {
"message": "string"
}
}