Skip to content

KeywordTableIndex

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:164

The KeywordTableIndex, an index that extracts keywords from each Node and builds a mapping from each keyword to the corresponding Nodes of that keyword.

new KeywordTableIndex(init): KeywordTableIndex

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:165

BaseIndexInit<KeywordTable>

KeywordTableIndex

BaseIndex.constructor

storageContext: StorageContext

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:52

BaseIndex.storageContext


docStore: BaseDocumentStore

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:53

BaseIndex.docStore


optional indexStore: BaseIndexStore

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:54

SummaryIndex.indexStore


indexStruct: KeywordTable

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:55

BaseIndex.indexStruct

asQueryTool(params): QueryEngineTool

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:94

Returns a query tool by calling asQueryEngine. Either options or retriever can be passed, but not both. If options are provided, they are passed to generate a retriever.

QueryToolParams

QueryEngineTool

BaseIndex.asQueryTool


insert(document): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:110

Insert a document into the index.

Document

Promise<void>

BaseIndex.insert


retriever(options?): BaseRetriever

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:127

Alias for asRetriever

any

BaseRetriever

BaseIndex.retriever


queryEngine(options?): BaseQueryEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:135

Alias for asQueryEngine

you can supply your own custom Retriever and ResponseSynthesizer

BaseRetriever

BaseSynthesizer

BaseQueryEngine

BaseIndex.queryEngine


queryTool(params): QueryEngineTool

Defined in: .build/typescript/packages/llamaindex/src/indices/BaseIndex.ts:147

Alias for asQueryTool Either options or retriever can be passed, but not both. If options are provided, they are passed to generate a retriever.

QueryToolParams

QueryEngineTool

BaseIndex.queryTool


static init(options): Promise<KeywordTableIndex>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:169

KeywordIndexOptions

Promise<KeywordTableIndex>


asRetriever(options?): BaseRetriever

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:232

Create a new retriever from the index.

any

BaseRetriever

BaseIndex.asRetriever


asQueryEngine(options?): BaseQueryEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:243

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

you can supply your own custom Retriever and ResponseSynthesizer

BaseRetriever

BaseSynthesizer

unknown

BaseNodePostprocessor[]

BaseQueryEngine

BaseIndex.asQueryEngine


asChatEngine(options?): BaseChatEngine

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:257

Create a new chat engine from the index.

KeywordTableIndexChatEngineOptions

BaseChatEngine

BaseIndex.asChatEngine


static extractKeywords(text): Promise<Set<string>>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:265

string

Promise<Set<string>>


static fromDocuments(documents, args): Promise<KeywordTableIndex>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:284

High level API: split documents, get keywords, and build index.

Document<Metadata>[]

StorageContext

Promise<KeywordTableIndex>


static buildIndexFromNodes(nodes, docStore): Promise<KeywordTable>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:313

Get keywords for nodes and place them into the index.

BaseNode<Metadata>[]

BaseDocumentStore

Promise<KeywordTable>


insertNodes(nodes): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:328

BaseNode<Metadata>[]

Promise<void>

BaseIndex.insertNodes


deleteNode(nodeId): void

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:337

string

void


deleteNodes(nodeIds, deleteFromDocStore): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:355

string[]

boolean

Promise<void>


deleteRefDoc(refDocId, deleteFromDocStore?): Promise<void>

Defined in: .build/typescript/packages/llamaindex/src/indices/keyword/index.ts:369

string

boolean

Promise<void>

BaseIndex.deleteRefDoc