PineconeDocumentStore
Use the Pinecone database as your document store.
Basic Information
- Used with the following retrievers:
- Type:
haystack_integrations.document_stores.pinecone.document_store.PineconeDocumentStore
Overview
For details, see PineconeDocumentStore in Haystack documentation.
Authorization
You need a Pinecone API key to use PineconeDocumentStore. You can create a secret for it and then pass it its name in the api_key
parameter of the document store. To learn more about secrets, see Add Secrets to Connect to Third Party Providers.
Usage
For instructions on how to create a secret to connect to the document store, write documents, and then retrieve them, see Connect to external database.
Example Configuration
In an Indexing Pipeline
To write the preprocesses files into the document store:
- Add DocumentWriter to your pipeline.
- On the component card, click Configure under the
document_store
parameters. This opens a YAML editor.
In a Query Pipeline
To retrieve files from the document store:
- Add a Pinecone retriever to your pipeline.
- On the retriever's card, click Configure under the
document_store
parameter. This opens a YAML editor.
Example
This is where you can access the configuration:
This is an example YAML configuration of PineconeDocumentStore:
type: haystack_integrations.document_stores.pinecone.document_store.PineconeDocumentStore
init_parameters:
api_key:
env_vars:
- PINECONE_API_KEY
strict: false
type: env_var
index: default
namespace: default
batch_size: 100
dimension: 768
metric: cosine
spec:
serverless:
region: us-east-1
cloud: aws
Init Parameters
To check the parameters you can customize for this document store, see PineconeDocumentStore API reference in Haystack documentation.
Updated about 8 hours ago