Skip to content

BaseIndex

Defined in: packages/core/src/indices/BaseIndex.ts:18

Indexes are the data structure that we store our nodes and embeddings in so they can be retrieved for our queries.

new BaseIndex(init): BaseIndex

Defined in: packages/core/src/indices/BaseIndex.ts:22

BaseIndexInit

BaseIndex

vectorStores: VectorStoreByType

Defined in: packages/core/src/indices/BaseIndex.ts:19


embeddings: EmbeddingsByType

Defined in: packages/core/src/indices/BaseIndex.ts:20

abstract asRetriever(options?): BaseRetriever

Defined in: packages/core/src/indices/BaseIndex.ts:32

Create a new retriever from the index.

any

BaseRetriever


insert(document): Promise<void>

Defined in: packages/core/src/indices/BaseIndex.ts:38

Insert a document into the index.

Document

Promise<void>


abstract insertNodes(nodes): Promise<void>

Defined in: packages/core/src/indices/BaseIndex.ts:53

BaseNode<Metadata>[]

Promise<void>


abstract deleteRefDoc(refDocId): Promise<void>

Defined in: packages/core/src/indices/BaseIndex.ts:54

string

Promise<void>


retriever(options?): BaseRetriever

Defined in: packages/core/src/indices/BaseIndex.ts:61

Alias for asRetriever

any

BaseRetriever