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.
Extends
Constructors
new KeywordTableIndex()
new KeywordTableIndex(
init
):KeywordTableIndex
Parameters
• init: BaseIndexInit
<KeywordTable
>
Returns
Overrides
Source
packages/core/src/indices/keyword/index.ts:152
Properties
docStore
docStore:
BaseDocumentStore
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:62
indexStore?
optional
indexStore:BaseIndexStore
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:64
indexStruct
indexStruct:
KeywordTable
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:65
serviceContext?
optional
serviceContext:ServiceContext
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:60
storageContext
storageContext:
StorageContext
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:61
vectorStore?
optional
vectorStore:VectorStore
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:63
Methods
asQueryEngine()
asQueryEngine(
options
?):QueryEngine
Create a new query engine from the index. It will also create a retriever and response synthezier if they are not provided.
Parameters
• options?
you can supply your own custom Retriever and ResponseSynthesizer
• options.nodePostprocessors?: BaseNodePostprocessor
[]
• options.preFilters?: unknown
• options.responseSynthesizer?: BaseSynthesizer
• options.retriever?: BaseRetriever
Returns
Overrides
Source
packages/core/src/indices/keyword/index.ts:232
asRetriever()
asRetriever(
options
?):BaseRetriever
Create a new retriever from the index.
Parameters
• options?: any