PineconeDocumentStore<T>
Models & Types ยท AiDotNet.RetrievalAugmentedGeneration.DocumentStores
Pinecone vector-database document store backed by the real Pinecone REST API.
Inheritance: DocumentStoreBase<T> โ PineconeDocumentStore<T>
Implements: IDisposable
For Beginners
Pinecone is a fully managed cloud vector database. This class is a
real client for it - each method makes an HTTP call to your Pinecone index. The index (and its
vector dimension) is created and managed in the Pinecone console; this client reads the
dimension from describe_index_stats when it starts up.
How It Works
This store talks to a Pinecone index over HTTP using the index host as the base URL and the
Api-Key header for authentication. It upserts vectors with metadata, queries with a
top-k + filter + includeMetadata, deletes vectors and reads index statistics. Document
content is stored inside the vector metadata under the reserved key _content. An optional
namespace scopes every operation.
Constructors
| Constructor | Summary |
|---|---|
PineconeDocumentStore(string indexName, string url, string apiKey, string namespace, HttpClient httpClient, HttpMessageHandler handler) |
Initializes a new instance of the PineconeDocumentStore class. |
Properties
| Property | Summary |
|---|---|
int DocumentCount { get; } |
Gets the number of vectors currently stored in the index (within the configured namespace). |
int VectorDimension { get; } |
Gets the dimensionality of vectors stored in this index. |
string IndexName { get; } |
Gets the name of the Pinecone index this store is bound to. |
string Namespace { get; } |
Gets the namespace all operations are scoped to (empty string means the default namespace). |
Methods
| Method | Summary |
|---|---|
Task ClearAsync(CancellationToken cancellationToken) |
|
void Clear() |
|
void Dispose() |
Releases the HTTP client when this store created it. |