Shortcode for rendering code snippets from separate markdown files (#1548)

* shortcode for rendering code snippets from separate markdown files

* formatted code

* fix and readme

* semi-automatically extracts snippets from markdown

* extract snippets from points.md

* extract snippets from vectors.md

* extract snippets from payload.md

* extract snippets from search.md + fixes

* extract snippets from explore.md

* extract snippets from hybrid-queries.md + mode query by id into search

* extract snippets from filtering.md

* extract snippets from storage.md + update outdated info

* extract snippets from indexing.md

* extract snippets from snapshots.md

* extract snippets from guides/optimize.md

* extract snippets from guides/multiple-partitions.md + fix aside note

* extract snippets from guides/quantization.md

* use auto-generated descriptions

* order json snippets first

---------

Co-authored-by: generall <andrey@vasnetsov.com>
This commit is contained in:
trean
2025-04-07 00:40:39 +02:00
committed by GitHub
co-authored by generall
parent 28a16b3966
commit 784f11cba4
1160 changed files with 17100 additions and 17966 deletions
@@ -0,0 +1 @@
This code snippet demonstrates a way to delete specific vectors from specified points in a collection. It allows users to remove selected vectors while retaining other vectors associated with the points. The points themselves are not deleted during this process, only certain vectors are removed. This method is available starting from version 1.2.0.
@@ -0,0 +1,3 @@
```csharp
await client.DeleteVectorsAsync("{collection_name}", ["text", "image"], [0, 3, 10]);
```
@@ -0,0 +1,16 @@
```go
import (
"context"
"github.com/qdrant/go-client/qdrant"
)
client.DeleteVectors(context.Background(), &qdrant.DeletePointVectors{
CollectionName: "{collection_name}",
PointsSelector: qdrant.NewPointsSelector(
qdrant.NewIDNum(0), qdrant.NewIDNum(3), qdrant.NewIDNum(10)),
Vectors: &qdrant.VectorsSelector{
Names: []string{"text", "image"},
},
})
```
@@ -0,0 +1,7 @@
```http
POST /collections/{collection_name}/points/vectors/delete
{
"points": [0, 3, 100],
"vectors": ["text", "image"]
}
```
@@ -0,0 +1,10 @@
```java
import java.util.List;
import static io.qdrant.client.PointIdFactory.id;
client
.deleteVectorsAsync(
"{collection_name}", List.of("text", "image"), List.of(id(0), id(3), id(10)))
.get();
```
@@ -0,0 +1,7 @@
```python
client.delete_vectors(
collection_name="{collection_name}",
points=[0, 3, 100],
vectors=["text", "image"],
)
```
@@ -0,0 +1,16 @@
```rust
use qdrant_client::qdrant::{
DeletePointVectorsBuilder, PointsIdsList,
};
client
.delete_vectors(
DeletePointVectorsBuilder::new("{collection_name}")
.points_selector(PointsIdsList {
ids: vec![0.into(), 3.into(), 10.into()],
})
.vectors(vec!["text".into(), "image".into()])
.wait(true),
)
.await?;
```
@@ -0,0 +1,6 @@
```typescript
client.deleteVectors("{collection_name}", {
points: [0, 3, 10],
vector: ["text", "image"],
});
```