mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-28 23:48:31 +02:00
docs: Parameterized int index Java, C#
This commit is contained in:
@@ -374,6 +374,52 @@ client
|
|||||||
.await?;
|
.await?;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```java
|
||||||
|
import io.qdrant.client.QdrantClient;
|
||||||
|
import io.qdrant.client.QdrantGrpcClient;
|
||||||
|
import io.qdrant.client.grpc.Collections.IntegerIndexParams;
|
||||||
|
import io.qdrant.client.grpc.Collections.PayloadIndexParams;
|
||||||
|
import io.qdrant.client.grpc.Collections.PayloadSchemaType;
|
||||||
|
|
||||||
|
QdrantClient client =
|
||||||
|
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||||
|
|
||||||
|
client
|
||||||
|
.createPayloadIndexAsync(
|
||||||
|
"{collection_name}",
|
||||||
|
"name_of_the_field_to_index",
|
||||||
|
PayloadSchemaType.Integer,
|
||||||
|
PayloadIndexParams.newBuilder()
|
||||||
|
.setIntegerIndexParams(
|
||||||
|
IntegerIndexParams.newBuilder().setLookup(false).setRange(true).build())
|
||||||
|
.build(),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null)
|
||||||
|
.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.Integer,
|
||||||
|
indexParams: new PayloadIndexParams
|
||||||
|
{
|
||||||
|
IntegerIndexParams = new()
|
||||||
|
{
|
||||||
|
Lookup = false,
|
||||||
|
Range = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Index
|
## Vector Index
|
||||||
|
|
||||||
A vector index is a data structure built on vectors through a specific mathematical model.
|
A vector index is a data structure built on vectors through a specific mathematical model.
|
||||||
|
|||||||
Reference in New Issue
Block a user