[v1.16] Collection metadata docs (#1986)

* wip: initial docs

* docs: Go snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Java snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Removed TODO!

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: C# snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* move collection metadata section into collection info

* fix code fence mismatch in markdown

* Remove empty line

---------

Signed-off-by: Anush008 <anushshetty90@gmail.com>
Co-authored-by: Anush008 <anushshetty90@gmail.com>
Co-authored-by: trean <trean.mi@gmail.com>
Co-authored-by: Tim Visée <tim@visee.me>
This commit is contained in:
Andrey Vasnetsov
2025-11-17 15:02:57 +01:00
committed by GitHub
co-authored by Anush008 trean Tim Visée
parent be24d900ef
commit 5ed4822559
20 changed files with 328 additions and 6 deletions
@@ -0,0 +1,22 @@
```rust
use qdrant_client::qdrant::{CreateCollectionBuilder, Distance, VectorParamsBuilder};
use qdrant_client::Qdrant;
use serde_json::{json, Value};
use std::collections::HashMap;
let client = Qdrant::from_url("http://localhost:6334").build()?;
let mut metadata: HashMap<String, Value> = HashMap::new();
metadata.insert("my-metadata-field".to_string(), json!("value-1"));
metadata.insert("another-field".to_string(), json!(123));
client
.create_collection(
CreateCollectionBuilder::new("{collection_name}")
.vectors_config(VectorParamsBuilder::new(100, Distance::Cosine))
.metadata(metadata),
)
.await?;
```