docs: Proofread and updated snippets (#1243)

This commit is contained in:
Anush
2024-10-22 14:03:46 +05:30
committed by GitHub
parent a092bc9460
commit 42873407ef
10 changed files with 101 additions and 98 deletions
@@ -1395,7 +1395,7 @@ QdrantClient client =
client
.searchMatrixPairsAsync(
Points.SearchMatrixPoints.newBuilder()
.setCollectionName(collectionName)
.setCollectionName("{collection_name}")
.setFilter(Filter.newBuilder().addMust(matchKeyword("color", "red")).build())
.setSample(10)
.setLimit(2)
@@ -1448,7 +1448,7 @@ using static Qdrant.Client.Grpc.Conditions;
var client = new QdrantClient("localhost", 6334);
await client.SearchMatrixPairs(
await client.SearchMatrixPairsAsync(
collectionName: "{collection_name}",
filter: MatchKeyword("color", "red"),
sample: 10,
@@ -1561,7 +1561,7 @@ QdrantClient client =
client
.searchMatrixOffsetsAsync(
SearchMatrixPoints.newBuilder()
.setCollectionName(collectionName)
.setCollectionName("{collection_name}")
.setFilter(Filter.newBuilder().addMust(matchKeyword("color", "red")).build())
.setSample(10)
.setLimit(2)
@@ -1614,7 +1614,7 @@ using static Qdrant.Client.Grpc.Conditions;
var client = new QdrantClient("localhost", 6334);
await client.SearchMatrixOffsets(
await client.SearchMatrixOffsetsAsync(
collectionName: "{collection_name}",
filter: MatchKeyword("color", "red"),
sample: 10,
@@ -2158,7 +2158,7 @@ Functionally, it will work with `keyword` and `uuid` indexes exactly the same, b
{
"key": "uuid",
"match": {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
"value": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
}
```
@@ -2166,14 +2166,14 @@ Functionally, it will work with `keyword` and `uuid` indexes exactly the same, b
```python
models.FieldCondition(
key="uuid",
match=models.MatchValue(uuid="f47ac10b-58cc-4372-a567-0e02b2c3d479"),
match=models.MatchValue(value="f47ac10b-58cc-4372-a567-0e02b2c3d479"),
)
```
```typescript
{
key: 'uuid',
match: {uuid: 'f47ac10b-58cc-4372-a567-0e02b2c3d479'}
match: {value: 'f47ac10b-58cc-4372-a567-0e02b2c3d479'}
}
```
@@ -2462,57 +2462,59 @@ models.FieldCondition(
```typescript
{
key: 'location',
geo_polygon: {
exterior: {
points: [
{
lon: -70.0,
lat: -70.0
},
{
lon: 60.0,
lat: -70.0
},
{
lon: 60.0,
lat: 60.0
},
{
lon: -70.0,
lat: 60.0
},
{
lon: -70.0,
lat: -70.0
}
]
key: "location",
geo_polygon: {
exterior: {
points: [
{
lon: -70.0,
lat: -70.0
},
interiors: {
points: [
{
lon: -65.0,
lat: -65.0
},
{
lon: 0.0,
lat: -65.0
},
{
lon: 0.0,
lat: 0.0
},
{
lon: -65.0,
lat: 0.0
},
{
lon: -65.0,
lat: -65.0
}
]
{
lon: 60.0,
lat: -70.0
},
{
lon: 60.0,
lat: 60.0
},
{
lon: -70.0,
lat: 60.0
},
{
lon: -70.0,
lat: -70.0
}
}
]
},
interiors: [
{
points: [
{
lon: -65.0,
lat: -65.0
},
{
lon: 0,
lat: -65.0
},
{
lon: 0,
lat: 0
},
{
lon: -65.0,
lat: 0
},
{
lon: -65.0,
lat: -65.0
}
]
}
]
}
}
```
@@ -2764,7 +2766,7 @@ models.IsEmptyCondition(
```typescript
{
is_empty: {
key: "reports";
key: "reports"
}
}
```
@@ -2820,7 +2822,7 @@ models.IsNullCondition(
```typescript
{
is_null: {
key: "reports";
key: "reports"
}
}
```
@@ -296,14 +296,14 @@ import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
client.query("{collection_name}", {
prefetch: {
query: [1, 23, 45, 67], // <------------- small byte vector
using: 'mrl_byte',
limit: 1000,
},
query: [0.01, 0.299, 0.45, 0.67, ...], // <-- full vector,
using: 'full',
limit: 10,
prefetch: {
query: [1, 23, 45, 67], // <------------- small byte vector
using: 'mrl_byte',
limit: 1000,
},
query: [0.01, 0.299, 0.45, 0.67], // <-- full vector,
using: 'full',
limit: 10,
});
```
@@ -628,23 +628,23 @@ import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
client.query("{collection_name}", {
prefetch: {
prefetch: {
prefetch: {
query: [1, 23, 45, 67, ...], // <------------- small byte vector
using: 'mrl_byte',
limit: 1000,
},
query: [0.01, 0.45, 0.67, ...], // <-- full dense vector
using: 'full',
limit: 100,
query: [1, 23, 45, 67], // <------------- small byte vector
using: 'mrl_byte',
limit: 1000,
},
query: [
[0.1, 0.2], // <─┐
[0.2, 0.1], // < ├─ multi-vector
[0.8, 0.9], // < ┘
],
using: 'colbert',
limit: 10,
query: [0.01, 0.45, 0.67], // <-- full dense vector
using: 'full',
limit: 100,
},
query: [
[0.1, 0.2], // <─┐
[0.2, 0.1], // < ├─ multi-vector
[0.8, 0.9], // < ┘
],
using: 'colbert',
limit: 10,
});
```
@@ -832,7 +832,7 @@ let client = Qdrant::from_url("http://localhost:6334").build()?;
client
.query(
QueryPointsBuilder::new("{collection_name}")
.query(Query::new_nearest(PointId::new("43cf51e2-8777-4f52-bc74-c2cbde0c8b04")))
.query(Query::new_nearest("43cf51e2-8777-4f52-bc74-c2cbde0c8b04")),
)
.await?;
```
@@ -943,7 +943,7 @@ let client = Qdrant::from_url("http://localhost:6334").build()?;
client.query(
QueryPointsBuilder::new("{collection_name}")
.query(Query::new_nearest(PointId::new("43cf51e2-8777-4f52-bc74-c2cbde0c8b04")))
.query(Query::new_nearest("43cf51e2-8777-4f52-bc74-c2cbde0c8b04"))
.using("512d-vector")
.lookup_from(
LookupLocationBuilder::new("another_collection")
@@ -182,7 +182,7 @@ client.create_payload_index(
```
```typescript
import { QdrantClient, Schemas } from "@qdrant/js-client-rest";
import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
@@ -379,7 +379,7 @@ client.create_payload_index(
```
```typescript
import { QdrantClient, Schemas } from "@qdrant/js-client-rest";
import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
@@ -1386,7 +1386,7 @@ var client = new QdrantClient("localhost", 6334);
await client.FacetAsync(
"{collection_name}",
key: "size",
filter: MatchKeyword("color", "red"),
filter: MatchKeyword("color", "red")
);
```
@@ -1367,7 +1367,7 @@ client.delete_vectors(
```typescript
client.deleteVectors("{collection_name}", {
points: [0, 3, 10],
vectors: ["text", "image"],
vector: ["text", "image"],
});
```
@@ -258,6 +258,7 @@ client.upsert("{collection_name}", {
},
},
}
]
});
```
@@ -831,17 +832,16 @@ client.query_points(
```
```typescript
import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
client.query("{collection_name}", {
"query": [
[-0.013, 0.020, -0.007, -0.111, ...],
[-0.030, -0.055, 0.001, 0.072, ...],
[-0.041, 0.014, -0.032, -0.062, ...]
]
"query": [
[-0.013, 0.020, -0.007, -0.111],
[-0.030, -0.055, 0.001, 0.072],
[-0.041, 0.014, -0.032, -0.062]
]
});
```
@@ -855,9 +855,9 @@ let res = client.query(
QueryPointsBuilder::new("{collection_name}")
.query(VectorInput::new_multi(
vec![
vec![-0.013, 0.020, -0.007, -0.111, ...],
vec![-0.030, -0.055, 0.001, 0.072, ...],
vec![-0.041, 0.014, -0.032, -0.062, ...],
vec![-0.013, 0.020, -0.007, -0.111],
vec![-0.030, -0.055, 0.001, 0.072],
vec![-0.041, 0.014, -0.032, -0.062],
]
))
).await?;
@@ -13,6 +13,7 @@ Qdrant exposes administration tools which enable to modify at runtime the behavi
A locking API enables users to restrict the possible operations on a qdrant process.
It is important to mention that:
- The configuration is not persistent therefore it is necessary to lock again following a restart.
- Locking applies to a single node only. It is necessary to call lock on all the desired nodes in a distributed deployment setup.
@@ -535,8 +535,7 @@ client.upsert(
```
```typescript
client.upsertPoints("{collection_name}", {
client.upsert("{collection_name}", {
points: [
{
id: 1111,
@@ -10,6 +10,7 @@ aliases:
Different use cases require different balances between memory usage, search speed, and precision. Qdrant is designed to be flexible and customizable so you can tune it to your specific needs.
This guide will walk you three main optimization strategies:
- High Speed Search & Low Memory Usage
- High Precision & Low Memory Usage
- High Precision & High Speed Search