mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-28 15:38:33 +02:00
docs: C# client usage (#599)
* docs: C# client usage part-1 * docs: used named arguments * docs: filtering operator overload comment
This commit is contained in:
@@ -92,6 +92,14 @@ client
|
||||
.get();
|
||||
```
|
||||
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreatePayloadIndexAsync(collectionName: "{collection_name}", fieldName: "name_of_the_field_to_index");
|
||||
```
|
||||
|
||||
Available field types are:
|
||||
|
||||
* `keyword` - for [keyword](../payload/#keyword) payload, affects [Match](../filtering/#match) filtering conditions.
|
||||
@@ -216,7 +224,7 @@ client
|
||||
.setTextIndexParams(
|
||||
TextIndexParams.newBuilder()
|
||||
.setTokenizer(TokenizerType.Word)
|
||||
.setMaxTokenLen(2)
|
||||
.setMinTokenLen(2)
|
||||
.setMaxTokenLen(10)
|
||||
.setLowercase(true)
|
||||
.build())
|
||||
@@ -227,6 +235,29 @@ client
|
||||
.get();
|
||||
```
|
||||
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreatePayloadIndexAsync(
|
||||
collectionName: "{collection_name}",
|
||||
fieldName: "name_of_the_field_to_index",
|
||||
schemaType: PayloadSchemaType.Text,
|
||||
indexParams: new PayloadIndexParams
|
||||
{
|
||||
TextIndexParams = new TextIndexParams
|
||||
{
|
||||
Tokenizer = TokenizerType.Word,
|
||||
MinTokenLen = 2,
|
||||
MaxTokenLen = 10,
|
||||
Lowercase = true
|
||||
}
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Available tokenizers are:
|
||||
|
||||
* `word` - splits the string into words, separated by spaces, punctuation marks, and special characters.
|
||||
|
||||
Reference in New Issue
Block a user