Class PineconeVectorStore
java.lang.Object
com.google.genkit.plugins.pinecone.PineconeVectorStore
Pinecone vector store implementation.
This class provides indexing and retrieval of documents using Pinecone vector database for similarity search.
-
Constructor Summary
ConstructorsConstructorDescriptionPineconeVectorStore(io.pinecone.clients.Pinecone pinecone, PineconeIndexConfig config, Embedder embedder) Creates a new PineconeVectorStore. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all documents in the namespace.voiddeleteByIds(List<String> ids) Deletes documents by their IDs.Gets the index configuration.io.pinecone.clients.IndexgetIndex()Gets the Pinecone index connection.index(ActionContext context, IndexerRequest request) Indexes documents into the vector store.voidInitializes the vector store by connecting to or creating the index.retrieve(ActionContext context, RetrieverRequest request) Retrieves documents similar to the query.
-
Constructor Details
-
PineconeVectorStore
public PineconeVectorStore(io.pinecone.clients.Pinecone pinecone, PineconeIndexConfig config, Embedder embedder) Creates a new PineconeVectorStore.- Parameters:
pinecone- the Pinecone clientconfig- the index configurationembedder- the embedder for generating vectors
-
-
Method Details
-
initialize
public void initialize()Initializes the vector store by connecting to or creating the index. -
retrieve
Retrieves documents similar to the query.- Parameters:
context- the action contextrequest- the retriever request- Returns:
- the retriever response with matching documents
-
index
Indexes documents into the vector store.- Parameters:
context- the action contextrequest- the indexer request- Returns:
- the indexer response
-
deleteByIds
Deletes documents by their IDs.- Parameters:
ids- the document IDs to delete
-
deleteAll
public void deleteAll()Deletes all documents in the namespace. -
getConfig
Gets the index configuration. -
getIndex
public io.pinecone.clients.Index getIndex()Gets the Pinecone index connection.
-