Files
landing_page/qdrant-landing/content/documentation/headless/snippets/query-points/with-offset/java.java
T
Abdon Pijpelink cf4119fa3f Add subsection about stable ordering to pagination section (#2463)
* 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
2026-06-30 13:07:43 +02:00

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();
}
}