Skip to main content

Class: KeywordTable

The underlying structure of each index.

Extends

Constructors

new KeywordTable()

new KeywordTable(indexId, summary): KeywordTable

Parameters

indexId: `${string}-${string}-${string}-${string}-${string}` = ...

summary: undefined | string = undefined

Returns

KeywordTable

Inherited from

IndexStruct.constructor

Defined in

packages/llamaindex/src/indices/IndexStruct.ts:10

Properties

indexId

indexId: string

Inherited from

IndexStruct.indexId

Defined in

packages/llamaindex/src/indices/IndexStruct.ts:7


summary?

optional summary: string

Inherited from

IndexStruct.summary

Defined in

packages/llamaindex/src/indices/IndexStruct.ts:8


table

table: Map<string, Set<string>>

Defined in

packages/llamaindex/src/indices/BaseIndex.ts:16


type

type: IndexStructType = IndexStructType.KEYWORD_TABLE

Defined in

packages/llamaindex/src/indices/BaseIndex.ts:17

Methods

addNode()

addNode(keywords, nodeId): void

Parameters

keywords: string[]

nodeId: string

Returns

void

Defined in

packages/llamaindex/src/indices/BaseIndex.ts:19


deleteNode()

deleteNode(keywords, nodeId): void

Parameters

keywords: string[]

nodeId: string

Returns

void

Defined in

packages/llamaindex/src/indices/BaseIndex.ts:28


getSummary()

getSummary(): string

Returns

string

Inherited from

IndexStruct.getSummary

Defined in

packages/llamaindex/src/indices/IndexStruct.ts:22


toJson()

toJson(): Record<string, unknown>

Returns

Record<string, unknown>

Overrides

IndexStruct.toJson

Defined in

packages/llamaindex/src/indices/BaseIndex.ts:36