Multiple vectors
Collections can have multiple named vectors.
The vectors in a collection can have their own configurations. Each vector space can set its own index, its own compression algorithm, and its own vectorizer. This means you can use different vectorization models, and apply different distance metrics, to the same object.
To work with named vectors, adjust your queries to specify a target vector for vector search or hybrid search queries.
Syntax
Single vector collections are valid and continue to use the original collection syntax. However, if you configure multiple vectors, you must use the new, named vector syntax to query your collections.
Collection definition
Use the collection definition to configure the vector spaces for each data object.
All named vectors must be defined when you create a collection. Currently, it is not possible to add or remove named vectors from a collection after it has been created.
Query a named vector
To do a vector search on a collection with named vectors, specify the vector space to search.
Use named vectors with vector similarity searches (near_text
, near_object
, near_vector
, near_image
) and hybrid search.
Named vector collections support hybrid search, but only for one vector at a time.
Keyword search syntax does not change if a collection has named vectors.
Related pages
- How-to: manage data: Configure collections
- How-to: search: Code examples for search
- Weaviate academy: Named vectors
Questions and feedback
If you have any questions or feedback, let us know in the user forum.