mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-26 14:38:30 +02:00
Docs for adding/removing named vectors (#2282)
* Initial commit * Switch to title case for Collections page * Move to Collections page * One more clarification * Update section title
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
Create a new dense named vector on an existing collection. Only the immutable vector-space properties are required: size and distance. Storage type, index, and quantization can be configured separately afterward.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
```http
|
||||
PUT /collections/{collection_name}/vectors/{vector_name}
|
||||
{
|
||||
"dense": {
|
||||
"size": 256,
|
||||
"distance": "Cosine"
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -0,0 +1 @@
|
||||
Create a new sparse named vector on an existing collection. Only the immutable vector-space properties are required. Storage type, index, and quantization can be configured separately afterward.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
```http
|
||||
PUT /collections/{collection_name}/vectors/{vector_name}
|
||||
{
|
||||
"sparse": {
|
||||
"modifier": "Idf"
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -0,0 +1 @@
|
||||
Delete a named vector from an existing collection. This removes the vector schema and all associated data from every segment. Existing points lose this vector field; they are not otherwise affected.
|
||||
@@ -0,0 +1,3 @@
|
||||
```http
|
||||
DELETE /collections/{collection_name}/vectors/{vector_name}
|
||||
```
|
||||
@@ -26,13 +26,13 @@ Qdrant supports these most popular types of metrics:
|
||||
In addition to metrics and vector size, each collection uses its own set of parameters that controls collection optimization, index construction, and vacuum.
|
||||
These settings can be changed at any time by a corresponding request.
|
||||
|
||||
## Setting up multitenancy
|
||||
## Setting Up Multitenancy
|
||||
|
||||
**How many collections should you create?** In most cases, you should only use a single collection with payload-based partitioning. This approach is called [multitenancy](https://en.wikipedia.org/wiki/Multitenancy). It is efficient for most of users, but it requires additional configuration. [Learn how to set it up](/documentation/manage-data/collections/#multitenancy)
|
||||
|
||||
**When should you create multiple collections?** When you have a limited number of users and you need isolation. This approach is flexible, but it may be more costly, since creating numerous collections may result in resource overhead. Also, you need to ensure that they do not affect each other in any way, including performance-wise.
|
||||
|
||||
## Create a collection
|
||||
## Create a Collection
|
||||
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/create-collection/simple/" >}}
|
||||
@@ -60,13 +60,13 @@ will enable the use of
|
||||
which is suitable for ingesting a large amount of data.
|
||||
|
||||
|
||||
### Collection with multiple vectors
|
||||
### Collection with Multiple Vectors
|
||||
|
||||
*Available as of v0.10.0*
|
||||
|
||||
It is possible to have multiple vectors per record.
|
||||
This feature allows for multiple vector storages per collection.
|
||||
To distinguish vectors in one record, they should have a unique name defined when creating the collection.
|
||||
To distinguish vectors in one record, they should have a unique [name](/documentation/manage-data/vectors/#named-vectors).
|
||||
Each named vector in this mode has its distance and size:
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ the use of
|
||||
which is suitable for ingesting a large amount of data.
|
||||
|
||||
|
||||
### Vector datatypes
|
||||
### Vector Datatypes
|
||||
|
||||
*Available as of v1.9.0*
|
||||
|
||||
@@ -107,7 +107,7 @@ Vectors with `uint8` datatype are stored in a more compact format, which can sav
|
||||
If you choose to use the `uint8` datatype, elements of the vector will be stored as unsigned 8-bit integers, which can take values **from 0 to 255**.
|
||||
|
||||
|
||||
### Collection with sparse vectors
|
||||
### Collection with Sparse Vectors
|
||||
|
||||
*Available as of v1.7.0*
|
||||
|
||||
@@ -128,7 +128,7 @@ The distance function for sparse vectors is always `Dot` and does not need to be
|
||||
|
||||
However, there are optional parameters to tune the underlying [sparse vector index](/documentation/manage-data/indexing/#sparse-vector-index).
|
||||
|
||||
### Create collection from another collection
|
||||
### Create Collection from Another Collection
|
||||
|
||||
To create a collection from another collection, use the [Migration Tool](https://github.com/qdrant/migration/). You can use it to either copy a collection within the same Qdrant instance or to copy a collection to another instance.
|
||||
|
||||
@@ -144,17 +144,21 @@ docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration
|
||||
--migration.batch-size 64
|
||||
```
|
||||
|
||||
## Check collection existence
|
||||
## Check Collection Existence
|
||||
|
||||
*Available as of v1.8.0*
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/check-collection-exists/simple/" >}}
|
||||
|
||||
## Delete collection
|
||||
## Delete Collection
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/delete-collection/simple/" >}}
|
||||
|
||||
## Update collection parameters
|
||||
## Update Collection
|
||||
|
||||
After creating a collection, you can change its configuration, its vectors, and the configuration of its vectors.
|
||||
|
||||
### Update Collection Parameters
|
||||
|
||||
Dynamic parameter updates may be helpful, for example, for more efficient initial loading of vectors.
|
||||
For example, you can disable indexing during the upload process, and enable it immediately after the upload is finished.
|
||||
@@ -179,7 +183,35 @@ Calls to this endpoint may be blocking as it waits for existing optimizers to
|
||||
finish. We recommended against using this in a production database as it may
|
||||
introduce huge overhead due to the rebuilding of the index.
|
||||
|
||||
#### Update vector parameters
|
||||
### Update Vector Schema
|
||||
|
||||
*Available as of v1.18.0*
|
||||
|
||||
Named vectors can be added to or removed from an existing collection without having to recreate the collection.
|
||||
|
||||
<aside role="status">
|
||||
These are schema-level operations that add or remove vector definitions from a collection's schema. To add/remove vector values from specific points, use the <a href="/documentation/manage-data/points/#update-vectors">update</a> and <a href="/documentation/manage-data/points/#delete-vectors">delete</a> vectors operations.
|
||||
</aside>
|
||||
|
||||
To add a new dense named vector to an existing collection:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/create-named-vector/dense/" >}}
|
||||
|
||||
To add a new sparse named vector to an existing collection:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/create-named-vector/sparse/" >}}
|
||||
|
||||
The request body only accepts properties that define the vector space (size and distance for dense vectors). Quantization, storage type, and index configuration can be set afterward using the [update collection parameters](/documentation/manage-data/collections/#update-collection-parameters) or [update vector parameters](/documentation/manage-data/collections/#update-vector-parameters) APIs.
|
||||
|
||||
Existing points will not have values for the newly added vector until they are upserted again. The new vector can be queried immediately, but will return no results until it is populated.
|
||||
|
||||
To delete a named vector from an existing collection:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/delete-named-vector/" >}}
|
||||
|
||||
Deleting a named vector removes its schema and all associated data. Existing points are otherwise unaffected.
|
||||
|
||||
### Update Vector Parameters
|
||||
|
||||
*Available as of v1.4.0*
|
||||
|
||||
@@ -210,7 +242,7 @@ both for the whole collection, and for `my_vector` specifically:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/update-collection/hnsw-and-quantization/" >}}
|
||||
|
||||
## Collection info
|
||||
## Collection Info
|
||||
|
||||
Qdrant allows determining the configuration parameters of an existing collection to better understand how the points are
|
||||
distributed and indexed.
|
||||
@@ -280,7 +312,7 @@ The following color statuses are possible:
|
||||
- ⚫ `grey`: collection is pending optimization ([help](#grey-collection-status))
|
||||
- 🔴 `red`: an error occurred which the engine could not recover from
|
||||
|
||||
### Grey collection status
|
||||
### Grey Collection Status
|
||||
|
||||
_Available as of v1.9.0_
|
||||
|
||||
@@ -298,7 +330,7 @@ For example:
|
||||
Alternatively you may use the `Trigger Optimizers` button in the [Qdrant Web UI](/documentation/web-ui/).
|
||||
It is shown next to the grey collection status on the collection info page.
|
||||
|
||||
### Approximate point and vector counts
|
||||
### Approximate Point and Vector Counts
|
||||
|
||||
You may be interested in the count attributes:
|
||||
|
||||
@@ -326,7 +358,7 @@ points or vectors you can query. If you want to know exact counts, refer to the
|
||||
|
||||
_Note: these numbers may be removed in a future version of Qdrant._
|
||||
|
||||
### Indexing vectors in HNSW
|
||||
### Indexing Vectors in HNSW
|
||||
|
||||
In some cases, you might be surprised the value of `indexed_vectors_count` is lower than you expected. This is an intended behaviour and
|
||||
depends on the [optimizer configuration](/documentation/ops-optimization/optimizer/). A new index segment is built if the size of non-indexed vectors is higher than the
|
||||
@@ -335,7 +367,7 @@ created and `indexed_vectors_count` might be equal to `0`.
|
||||
|
||||
It is possible to reduce the `indexing_threshold` for an existing collection by [updating collection parameters](#update-collection-parameters).
|
||||
|
||||
### Collection metadata
|
||||
### Collection Metadata
|
||||
|
||||
*Available as of v1.16.0*
|
||||
|
||||
@@ -371,7 +403,7 @@ When specified, metadata is returned as part of collection info:
|
||||
```
|
||||
|
||||
|
||||
## Collection aliases
|
||||
## Collection Aliases
|
||||
|
||||
In a production environment, it is sometimes necessary to switch different versions of vectors seamlessly.
|
||||
For example, when upgrading to a new version of the neural network.
|
||||
@@ -383,30 +415,30 @@ All queries to the collection can also be done identically, using an alias inste
|
||||
Thus, it is possible to build a second collection in the background and then switch alias from the old to the new collection.
|
||||
Since all changes of aliases happen atomically, no concurrent requests will be affected during the switch.
|
||||
|
||||
### Create alias
|
||||
### Create Alias
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/collection-aliases/create/" >}}
|
||||
|
||||
### Remove alias
|
||||
### Remove Alias
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/collection-aliases/delete/" >}}
|
||||
|
||||
### Switch collection
|
||||
### Switch Collection
|
||||
|
||||
Multiple alias actions are performed atomically.
|
||||
For example, you can switch underlying collection with the following command:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/collection-aliases/switch/" >}}
|
||||
|
||||
### List collection aliases
|
||||
### List Collection Aliases
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/collection-aliases/list/" >}}
|
||||
|
||||
### List all aliases
|
||||
### List All Aliases
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/collection-aliases/list-all/" >}}
|
||||
|
||||
### List all collections
|
||||
### List All Collections
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/list-all-collections/simple/" >}}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ $$
|
||||
|
||||
Where $N$ is the number of vectors in the first matrix, $M$ is the number of vectors in the second matrix, and $\text{Sim}$ is a similarity function, for example, cosine similarity.
|
||||
|
||||
To use multivectors, create a collection with the following configuration:
|
||||
To use multivectors, create a dense vector with a multivector comparator:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/create-collection/with-multivector/" >}}
|
||||
|
||||
@@ -148,7 +148,7 @@ To search with multivector (available in `query` API):
|
||||
|
||||
In Qdrant, you can store multiple vectors of different sizes and [types](#vector-types) in the same data [point](/documentation/manage-data/points/). This is useful when you need to define your data with multiple embeddings to represent different features or modalities (e.g., image, text or video).
|
||||
|
||||
To store different vectors for each point, you need to create separate named vector spaces in the [collection](/documentation/manage-data/collections/). You can define these vector spaces during collection creation and manage them independently.
|
||||
To store different vectors for each point, you need to create separate named vector spaces in the [collection](/documentation/manage-data/collections/). You can define these vector spaces during collection creation or [add them later](#adding-and-removing-named-vectors) and manage them independently.
|
||||
|
||||
<aside role="status">
|
||||
Each vector should have a unique name. Vectors can represent different modalities and you can use different embedding models to generate them.
|
||||
@@ -166,6 +166,19 @@ To search with named vectors (available in `query` API):
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/query-points/named-vector/" >}}
|
||||
|
||||
### Adding and Removing Named Vectors
|
||||
|
||||
*Available as of v1.18.0*
|
||||
|
||||
Named vectors can be added to or removed from an existing collection without having to recreate the collection.
|
||||
|
||||
For example:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/create-named-vector/dense/" >}}
|
||||
|
||||
Refer to [Update Vectors](/documentation/manage-data/collections/#update-vectors) for more details.
|
||||
|
||||
|
||||
## Inference
|
||||
|
||||
Instead of providing vectors explicitly when ingesting or querying data, Qdrant can also generate vectors using a process called [inference](/documentation/inference/). Inference is the process of creating vector embeddings from text, images, or other data types using a machine learning model.
|
||||
|
||||
@@ -182,7 +182,7 @@ Qdrant provides native support for BM25 through an [inference model](/documentat
|
||||
|
||||
The BM25 model supports the same [text processing](#text-processing) options as text indices, including tokenization, lowercasing, ASCII folding, stemming, and stopword removal. A notable difference with text indices is that BM25 defaults to English stemming and stopword removal. If you are using a language other than English, ensure that you [configure](#language-specific-settings) the model accordingly.
|
||||
|
||||
To use BM25, configure a sparse vector when creating a collection:
|
||||
To use BM25, configure a sparse vector:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/text-search/create-bm25-collection/" >}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user