Skip to content

ElasticSearchVectorStore

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:43

ElasticSearchVectorStore provides vector storage and similarity search capabilities using Elasticsearch. It extends BaseVectorStore to implement vector storage operations with Elasticsearch as the backend.

new ElasticSearchVectorStore(init): ElasticSearchVectorStore

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:64

Creates a new instance of ElasticSearchVectorStore

ElasticSearchParams

Configuration parameters for Elasticsearch connection and indexing

ElasticSearchVectorStore

BaseVectorStore.constructor

embedModel: BaseEmbedding

Defined in: packages/core/src/vector-store/index.ts:128

BaseVectorStore.embedModel


optional isEmbeddingQuery: boolean

Defined in: packages/core/src/vector-store/index.ts:130

BaseVectorStore.isEmbeddingQuery


storesText: boolean = true

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:44

BaseVectorStore.storesText

client(): Client

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:97

Returns the Elasticsearch client instance

Client

The configured Elasticsearch client

BaseVectorStore.client


add(nodes): Promise<string[]>

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:143

Adds nodes to the vector store

BaseNode<Metadata>[]

Array of BaseNode objects to store

Promise<string[]>

Array of node IDs that were successfully stored

Error if nodes don’t have embeddings

BaseVectorStore.add


delete(refDocId, deleteOptions?): Promise<void>

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:187

Deletes nodes from the vector store by reference document ID

string

Reference document ID to delete

object

Optional deletion parameters

Promise<void>

BaseVectorStore.delete


query(query, options?): Promise<VectorStoreQueryResult>

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:253

Performs a vector similarity search query

VectorStoreQuery

Vector store query parameters

object

Optional query parameters

Promise<VectorStoreQueryResult>

Query results containing matching nodes, similarities, and IDs

Error if query embedding is not provided

BaseVectorStore.query


exists(refDocId): Promise<boolean>

Defined in: packages/providers/storage/elastic-search/src/ElasticSearchVector.ts:372

Check if any nodes exist for the given document reference ID. Used for de-duplication during ingestion.

string

The reference document ID to check

Promise<boolean>

true if any nodes with this ref_doc_id exist

BaseVectorStore.exists