{
  "schema_version": 2,
  "id": "develop/ai/redisvl/api/vector",
  "title": "Vector",
  "url": "https://redis.io/docs/latest/develop/ai/redisvl/api/vector/",
  "summary": "",
  "aliases": [
    "/integrate/redisvl/api/vector"
  ],
  "tags": [],
  "last_updated": "2026-04-22T11:55:45+02:00",
  "page_type": "content",
  "content_hash": "8b3912325c73debc784132e3658e63b41d7c5db9fe0d5f8516e0b0bcc4f76132",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The 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."
    },
    {
      "id": "vector",
      "title": "Vector",
      "role": "content",
      "text": ""
    },
    {
      "id": "class-vector-vector-field_name-dtypefloat32-weight10-max_distance20",
      "title": "`class Vector(*, vector, field_name, dtype='float32', weight=1.0, max_distance=2.0)`",
      "role": "content",
      "text": "Simple 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]."
    }
  ],
  "examples": []
}
