Class PineconeVectorStore
java.lang.Object
org.springframework.ai.vectorstore.PineconeVectorStore
- All Implemented Interfaces:
Consumer<List<Document>>
,DocumentWriter
,VectorStore
A VectorStore implementation backed by Pinecone, a cloud-based vector database. This
store supports creating, updating, deleting, and similarity searching of documents in a
Pinecone index.
- Author:
- Christian Tzolov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Configuration class for the PineconeVectorStore. -
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionPineconeVectorStore
(PineconeVectorStore.PineconeVectorStoreConfig config, EmbeddingClient embeddingClient) Constructs a new PineconeVectorStore. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a list of documents to the vector store.Deletes a list of documents by their IDs.similaritySearch
(SearchRequest request) Retrieves documents by query embedding similarity and metadata filters to retrieve exactly the number of nearest-neighbor results that match the request criteria.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.vectorstore.VectorStore
accept, similaritySearch
-
Field Details
-
filterExpressionConverter
-
-
Constructor Details
-
PineconeVectorStore
public PineconeVectorStore(PineconeVectorStore.PineconeVectorStoreConfig config, EmbeddingClient embeddingClient) Constructs a new PineconeVectorStore.- Parameters:
config
- The configuration for the store.embeddingClient
- The client for embedding operations.
-
-
Method Details
-
add
Adds a list of documents to the vector store.- Specified by:
add
in interfaceVectorStore
- Parameters:
documents
- The list of documents to be added.
-
delete
Deletes a list of documents by their IDs.- Specified by:
delete
in interfaceVectorStore
- Parameters:
documentIds
- The list of document IDs to be deleted.- Returns:
- An optional boolean indicating the deletion status.
-
similaritySearch
Description copied from interface:VectorStore
Retrieves documents by query embedding similarity and metadata filters to retrieve exactly the number of nearest-neighbor results that match the request criteria.- Specified by:
similaritySearch
in interfaceVectorStore
- Parameters:
request
- Search request for set search parameters, such as the query text, topK, similarity threshold and metadata filter expressions.- Returns:
- Returns documents th match the query request conditions.
-