# Weaviate Features and Practical Usage
๐ Give a single object several meaning spaces at once: one for the title, one for the body, one for the image. Named vectors are the core design pattern for multimodal and purpose-specific search within a single collection.
๐ Title and Feature URL
Title: Named vectors (collection definition)
URL:
๐ Overview
Named vectors let a single object hold multiple vector embeddings simultaneously. Each vector can have its own source properties, vectorizer, index, and compression algorithm, so it behaves as an independent vector space. This lets you switch which vector you search against depending on the use case.
๐ง How It Works
- Each named vector can use its own vectorizer (e.g. text2vec-openai, text2vec-cohere).
- source_properties controls which object properties feed a given vector (e.g. only title, or only body).
- Each named vector has its own index type (hnsw / flat / dynamic) and config, so each space can be optimized independently.
- As the docs put it: "Each vector space can set its own index, its own compression algorithm, and its own vectorizer."
- The name "default" is reserved for single-vector collections created without explicit vector configuration.
๐ Practical Usage
In the Python client, pass an array to vector_config to define multiple vectors.
- Definition: vector_config=[Configure.Vectors.text2vec_openai(name="title", source_properties=["title"]), Configure.Vectors.text2vec_openai(name="body", source_properties=["body"])]
- At query time, choose the vector with target_vector. Example: collection.query.near_text(query="AI applications", target_vector="body").
- When supplying your own vectors during batch import, pass a dict keyed by vector name: batch.add_object(properties=row, vector={"title": title_vec, "body": body_vec}).
- New named vectors can be added after collection creation.
๐ฏ Use Cases
- Give articles a title vector and a body vector to power "related articles by headline similarity" and "search by body meaning" separately.
- In e-commerce, keep a product-image vector and a description vector together for image similarity and text semantic search on the same object.
- For multilingual content, maintain language-specific vectors to improve per-language retrieval.
- Embed document sections with specialized models for domain-specific search.
โ ๏ธ Caveats
- The vectorizer, index type, and source property definitions cannot be changed after collection creation (adding new vectors is allowed).
- You cannot combine named vectors (vector_config) with top-level vectorizer / vectorIndexType in the same collection.
- More vectors mean more embedding cost and more storage/memory; define only what you actually need.
- Queries must specify target_vector; forgetting it is a common mistake.
#
Weaviate# #
Embeddings#