Class: KeywordTableIndex
The KeywordTableIndex, an index that extracts keywords from each Node and builds a mapping from each keyword to the corresponding Nodes of that keyword.
Hierarchy
-
↳
KeywordTableIndex
Constructors
constructor
• new KeywordTableIndex(init
): KeywordTableIndex
Parameters
Name | Type |
---|---|
init | BaseIndexInit <KeywordTable > |
Returns
Overrides
Defined in
packages/core/src/indices/keyword/KeywordTableIndex.ts:53
Properties
docStore
• docStore: BaseDocumentStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:157
indexStore
• Optional
indexStore: BaseIndexStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:159
indexStruct
• indexStruct: KeywordTable
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:160
serviceContext
• serviceContext: ServiceContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:155
storageContext
• storageContext: StorageContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:156
vectorStore
• Optional
vectorStore: VectorStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:158
Methods
asQueryEngine
▸ 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
Name | Type | Description |
---|---|---|
options? | Object | you can supply your own custom Retriever and ResponseSynthesizer |
options.nodePostprocessors? | BaseNodePostprocessor [] | - |
options.preFilters? | unknown | - |
options.responseSynthesizer? | BaseSynthesizer | - |
options.retriever? | BaseRetriever | - |
Returns
BaseQueryEngine
Overrides
Defined in
packages/core/src/indices/keyword/KeywordTableIndex.ts:134
asRetriever
▸ asRetriever(options?
): BaseRetriever
Create a new retriever from the index.
Parameters
Name | Type |
---|---|
options? | any |
Returns
Overrides
Defined in
packages/core/src/indices/keyword/KeywordTableIndex.ts:123
deleteNode
▸ deleteNode(nodeId
): void
Parameters
Name | Type |
---|---|
nodeId | string |
Returns
void
Defined in
packages/core/src/indices/keyword/KeywordTableIndex.ts:228
deleteNodes
▸ deleteNodes(nodeIds
, deleteFromDocStore
): Promise
<void
>
Parameters
Name | Type |
---|---|
nodeIds | string [] |
deleteFromDocStore | boolean |
Returns
Promise
<void
>
Defined in
packages/core/src/indices/keyword/KeywordTableIndex.ts:246