vector-search
Conduct vector-based searches in a Meilisearch index using JSON arrays or text queries, with options for filtering, hybrid searches, and result customization for precise data retrieval.
Instructions
Perform a vector search in a Meilisearch index
Input Schema
Name | Required | Description | Default |
---|---|---|---|
attributes | No | Attributes to include in the vector search | |
embedder | No | Name of the embedder to use (if omitted, a 'vector' must be provided) | |
filter | No | Filter to apply (e.g., 'genre = horror AND year > 2020') | |
hybrid | No | Whether to perform a hybrid search (combining vector and text search) | |
hybridRatio | No | Ratio of vector vs text search in hybrid search (0-1, default: 0.5) | |
indexUid | Yes | Unique identifier of the index | |
limit | No | Maximum number of results to return (default: 20) | |
offset | No | Number of results to skip (default: 0) | |
query | No | Text query to search for (if using 'embedder' instead of 'vector') | |
vector | Yes | JSON array representing the vector to search for |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"attributes": {
"description": "Attributes to include in the vector search",
"items": {
"type": "string"
},
"type": "array"
},
"embedder": {
"description": "Name of the embedder to use (if omitted, a 'vector' must be provided)",
"type": "string"
},
"filter": {
"description": "Filter to apply (e.g., 'genre = horror AND year > 2020')",
"type": "string"
},
"hybrid": {
"description": "Whether to perform a hybrid search (combining vector and text search)",
"type": "boolean"
},
"hybridRatio": {
"description": "Ratio of vector vs text search in hybrid search (0-1, default: 0.5)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"indexUid": {
"description": "Unique identifier of the index",
"type": "string"
},
"limit": {
"description": "Maximum number of results to return (default: 20)",
"maximum": 1000,
"minimum": 1,
"type": "number"
},
"offset": {
"description": "Number of results to skip (default: 0)",
"minimum": 0,
"type": "number"
},
"query": {
"description": "Text query to search for (if using 'embedder' instead of 'vector')",
"type": "string"
},
"vector": {
"description": "JSON array representing the vector to search for",
"type": "string"
}
},
"required": [
"indexUid",
"vector"
],
"type": "object"
}