Skip to main content

Class: BaseIndex<T>

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

Type parameters

Name
T

Hierarchy

Constructors

constructor

new BaseIndex<T>(init)

Type parameters

Name
T

Parameters

NameType
initBaseIndexInit<T>

Defined in

indices/BaseIndex.ts:122

Properties

docStore

docStore: BaseDocumentStore

Defined in

indices/BaseIndex.ts:117


indexStore

Optional indexStore: BaseIndexStore

Defined in

indices/BaseIndex.ts:119


indexStruct

indexStruct: T

Defined in

indices/BaseIndex.ts:120


serviceContext

serviceContext: ServiceContext

Defined in

indices/BaseIndex.ts:115


storageContext

storageContext: StorageContext

Defined in

indices/BaseIndex.ts:116


vectorStore

Optional vectorStore: VectorStore

Defined in

indices/BaseIndex.ts:118

Methods

asQueryEngine

Abstract asQueryEngine(options?): BaseQueryEngine

Create a new query engine from the index. It will also create a retriever and response synthezier if they are not provided.

Parameters

NameTypeDescription
options?Objectyou can supply your own custom Retriever and ResponseSynthesizer
options.responseSynthesizer?ResponseSynthesizer-
options.retriever?BaseRetriever-

Returns

BaseQueryEngine

Defined in

indices/BaseIndex.ts:142


asRetriever

Abstract asRetriever(options?): BaseRetriever

Create a new retriever from the index.

Parameters

NameType
options?any

Returns

BaseRetriever

Defined in

indices/BaseIndex.ts:135