{
  "id": "vector",
  "title": "Vector",
  "url": "https://redis.io/docs/latest/develop/ai/redisvl/0.17.0/api/vector/",
  "summary": "",
  "content": "\n\nThe Vector class in RedisVL is a container that encapsulates a numerical vector, it’s datatype, corresponding index field name, and optional importance weight. It is used when constructing multi-vector queries using the MultiVectorQuery class.\n\n## Vector\n\n### `class Vector(*, vector, field_name, dtype='float32', weight=1.0, max_distance=2.0)`\n\nSimple object containing the necessary arguments to perform a multi vector query.\n\nArgs:\nvector: The vector values as a list of floats or bytes\nfield_name: The name of the vector field to search\ndtype: The data type of the vector (default: \"float32\")\nweight: The weight for this vector in the combined score (default: 1.0)\nmax_distance: The maximum distance for vector range search (default: 2.0, range: [0.0, 2.0])\n\nCreate a new model by parsing and validating input data from keyword arguments.\n\nRaises [ValidationError][pydantic_core.ValidationError] if the input data cannot be\nvalidated to form a valid model.\n\nself is explicitly positional-only to allow self as a field name.\n\n* **Parameters:**\n  * **vector** (*List* *[* *float* *]*  *|* *bytes*)\n  * **field_name** (*str*)\n  * **dtype** (*str*)\n  * **weight** (*float*)\n  * **max_distance** (*float*)\n\n#### `validate_vector()`\n\nIf the vector passed in is an array of float convert it to a byte string.\n\n* **Return type:**\n  *Self*\n\n#### `model_config: ClassVar[ConfigDict] = {}`\n\nConfiguration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].\n",
  "tags": [],
  "last_updated": "2026-04-21T14:39:33+02:00"
}
