From 42873407efb161792f6e5326800fc3b4be650e34 Mon Sep 17 00:00:00 2001 From: Anush Date: Tue, 22 Oct 2024 14:03:46 +0530 Subject: [PATCH] docs: Proofread and updated snippets (#1243) --- .../content/documentation/concepts/explore.md | 8 +- .../documentation/concepts/filtering.md | 110 +++++++++--------- .../documentation/concepts/hybrid-queries.md | 50 ++++---- .../documentation/concepts/indexing.md | 4 +- .../content/documentation/concepts/payload.md | 2 +- .../content/documentation/concepts/points.md | 2 +- .../content/documentation/concepts/vectors.md | 18 +-- .../documentation/guides/administration.md | 1 + .../guides/distributed_deployment.md | 3 +- .../content/documentation/guides/optimize.md | 1 + 10 files changed, 101 insertions(+), 98 deletions(-) diff --git a/qdrant-landing/content/documentation/concepts/explore.md b/qdrant-landing/content/documentation/concepts/explore.md index 2cc98c597..eb245c69e 100644 --- a/qdrant-landing/content/documentation/concepts/explore.md +++ b/qdrant-landing/content/documentation/concepts/explore.md @@ -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, diff --git a/qdrant-landing/content/documentation/concepts/filtering.md b/qdrant-landing/content/documentation/concepts/filtering.md index 8521ac246..2c03ac1c6 100644 --- a/qdrant-landing/content/documentation/concepts/filtering.md +++ b/qdrant-landing/content/documentation/concepts/filtering.md @@ -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" } } ``` diff --git a/qdrant-landing/content/documentation/concepts/hybrid-queries.md b/qdrant-landing/content/documentation/concepts/hybrid-queries.md index 3935ecd13..075ec851f 100644 --- a/qdrant-landing/content/documentation/concepts/hybrid-queries.md +++ b/qdrant-landing/content/documentation/concepts/hybrid-queries.md @@ -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") diff --git a/qdrant-landing/content/documentation/concepts/indexing.md b/qdrant-landing/content/documentation/concepts/indexing.md index 6762abe53..758b00e07 100644 --- a/qdrant-landing/content/documentation/concepts/indexing.md +++ b/qdrant-landing/content/documentation/concepts/indexing.md @@ -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 }); diff --git a/qdrant-landing/content/documentation/concepts/payload.md b/qdrant-landing/content/documentation/concepts/payload.md index 4735fd21b..09a6d97ab 100644 --- a/qdrant-landing/content/documentation/concepts/payload.md +++ b/qdrant-landing/content/documentation/concepts/payload.md @@ -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") ); ``` diff --git a/qdrant-landing/content/documentation/concepts/points.md b/qdrant-landing/content/documentation/concepts/points.md index 140c6c843..a24f78938 100755 --- a/qdrant-landing/content/documentation/concepts/points.md +++ b/qdrant-landing/content/documentation/concepts/points.md @@ -1367,7 +1367,7 @@ client.delete_vectors( ```typescript client.deleteVectors("{collection_name}", { points: [0, 3, 10], - vectors: ["text", "image"], + vector: ["text", "image"], }); ``` diff --git a/qdrant-landing/content/documentation/concepts/vectors.md b/qdrant-landing/content/documentation/concepts/vectors.md index 66291f032..48e19580c 100644 --- a/qdrant-landing/content/documentation/concepts/vectors.md +++ b/qdrant-landing/content/documentation/concepts/vectors.md @@ -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?; diff --git a/qdrant-landing/content/documentation/guides/administration.md b/qdrant-landing/content/documentation/guides/administration.md index 228f884cf..e74526a91 100644 --- a/qdrant-landing/content/documentation/guides/administration.md +++ b/qdrant-landing/content/documentation/guides/administration.md @@ -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. diff --git a/qdrant-landing/content/documentation/guides/distributed_deployment.md b/qdrant-landing/content/documentation/guides/distributed_deployment.md index 0ffc449f9..237baaa88 100644 --- a/qdrant-landing/content/documentation/guides/distributed_deployment.md +++ b/qdrant-landing/content/documentation/guides/distributed_deployment.md @@ -535,8 +535,7 @@ client.upsert( ``` ```typescript - -client.upsertPoints("{collection_name}", { +client.upsert("{collection_name}", { points: [ { id: 1111, diff --git a/qdrant-landing/content/documentation/guides/optimize.md b/qdrant-landing/content/documentation/guides/optimize.md index 0fcfb57e2..e65224986 100644 --- a/qdrant-landing/content/documentation/guides/optimize.md +++ b/qdrant-landing/content/documentation/guides/optimize.md @@ -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