Add TS snippets for adding/removing named vectors

This commit is contained in:
Abdon Pijpelink
2026-05-07 09:46:50 +02:00
parent 483b384421
commit cb585a1fce
6 changed files with 42 additions and 0 deletions
@@ -0,0 +1,8 @@
```typescript
client.createVectorName("{collection_name}", "{vector_name}", {
dense: {
size: 256,
distance: "Cosine",
},
});
```
@@ -0,0 +1,10 @@
import { QdrantClient } from "@qdrant/js-client-rest"; // @hide
const client = new QdrantClient({ host: "localhost", port: 6333 }); // @hide
client.createVectorName("{collection_name}", "{vector_name}", {
dense: {
size: 256,
distance: "Cosine",
},
});
@@ -0,0 +1,7 @@
```typescript
client.createVectorName("{collection_name}", "{vector_name}", {
sparse: {
modifier: "idf",
},
});
```
@@ -0,0 +1,9 @@
import { QdrantClient } from "@qdrant/js-client-rest"; // @hide
const client = new QdrantClient({ host: "localhost", port: 6333 }); // @hide
client.createVectorName("{collection_name}", "{vector_name}", {
sparse: {
modifier: "idf",
},
});
@@ -0,0 +1,3 @@
```typescript
client.deleteVectorName("{collection_name}", "{vector_name}");
```
@@ -0,0 +1,5 @@
import { QdrantClient } from "@qdrant/js-client-rest"; // @hide
const client = new QdrantClient({ host: "localhost", port: 6333 }); // @hide
client.deleteVectorName("{collection_name}", "{vector_name}");