Class QdrantEmbeddingStore
java.lang.Object
dev.langchain4j.store.embedding.qdrant.QdrantEmbeddingStore
- All Implemented Interfaces:
EmbeddingStore<TextSegment>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQdrantEmbeddingStore(io.qdrant.client.QdrantClient client, String collectionName, String payloadTextKey) QdrantEmbeddingStore(String collectionName, String host, int port, boolean useTls, String payloadTextKey, String apiKey) -
Method Summary
Modifier and TypeMethodDescriptionadd(Embedding embedding, TextSegment textSegment) voidvoidstatic QdrantEmbeddingStore.Builderbuilder()voidDeletes all points from the Qdrant collection.voidclose()Closes the underlying GRPC client.voidvoidvoidvoidremoveAll(Collection<String> ids) search(EmbeddingSearchRequest request) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EmbeddingStore
addAll, addListener, addListeners, generateIds
-
Constructor Details
-
QdrantEmbeddingStore
public QdrantEmbeddingStore(String collectionName, String host, int port, boolean useTls, String payloadTextKey, @Nullable String apiKey) - Parameters:
collectionName- The name of the Qdrant collection.host- The host of the Qdrant instance.port- The GRPC port of the Qdrant instance.useTls- Whether to use TLS(HTTPS).payloadTextKey- The field name of the text segment in the Qdrant payload.apiKey- The Qdrant API key to authenticate with.
-
QdrantEmbeddingStore
-
-
Method Details
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
addAll
- Specified by:
addAllin interfaceEmbeddingStore<TextSegment>
-
addAll
public void addAll(List<String> ids, List<Embedding> embeddings, List<TextSegment> textSegments) throws RuntimeException - Specified by:
addAllin interfaceEmbeddingStore<TextSegment>- Throws:
RuntimeException
-
remove
- Specified by:
removein interfaceEmbeddingStore<TextSegment>
-
removeAll
- Specified by:
removeAllin interfaceEmbeddingStore<TextSegment>
-
removeAll
- Specified by:
removeAllin interfaceEmbeddingStore<TextSegment>
-
removeAll
public void removeAll()- Specified by:
removeAllin interfaceEmbeddingStore<TextSegment>
-
search
- Specified by:
searchin interfaceEmbeddingStore<TextSegment>
-
clearStore
public void clearStore()Deletes all points from the Qdrant collection. -
close
public void close()Closes the underlying GRPC client. -
builder
-