mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-27 23:18:29 +02:00
* Add 'Stable Ordering' section to 'Pagination' section * Add FAQ entry * Small edits to the Pagination section * Apply title case to all headers on page * Small edit
31 lines
1.2 KiB
Java
31 lines
1.2 KiB
Java
package com.example.snippets_amalgamation;
|
|
|
|
import static io.qdrant.client.QueryFactory.nearest;
|
|
import static io.qdrant.client.WithPayloadSelectorFactory.enable;
|
|
|
|
import io.qdrant.client.QdrantClient;
|
|
import io.qdrant.client.QdrantGrpcClient;
|
|
import io.qdrant.client.WithVectorsSelectorFactory;
|
|
import io.qdrant.client.grpc.Points.QueryPoints;
|
|
import java.util.List;
|
|
|
|
public class Snippet {
|
|
public static void run() throws Exception {
|
|
// @hide-start
|
|
QdrantClient client =
|
|
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
|
// @hide-end
|
|
|
|
client.queryAsync(
|
|
QueryPoints.newBuilder()
|
|
.setCollectionName("{collection_name}")
|
|
.setQuery(nearest(0.2f, 0.1f, 0.9f, 0.7f))
|
|
.setWithPayload(enable(true))
|
|
.setWithVectors(WithVectorsSelectorFactory.enable(true))
|
|
.setLimit(10)
|
|
.setOffset(100)
|
|
.build())
|
|
.get();
|
|
}
|
|
}
|