Class: SummaryIndex
A SummaryIndex keeps nodes in a sequential order for use with summarization.
Hierarchy
Constructors
constructor
• new SummaryIndex(init
): SummaryIndex
Parameters
Name | Type |
---|---|
init | BaseIndexInit <IndexList > |
Returns
Overrides
Defined in
packages/core/src/indices/summary/index.ts:57
Properties
docStore
• docStore: BaseDocumentStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:62
indexStore
• Optional
indexStore: BaseIndexStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:64
indexStruct
• indexStruct: IndexList
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:65
serviceContext
• Optional
serviceContext: ServiceContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:60
storageContext
• storageContext: StorageContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:61
vectorStore
• Optional
vectorStore: VectorStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:63
Methods
asQueryEngine
▸ asQueryEngine(options?
): QueryEngine
& RetrieverQueryEngine
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
QueryEngine
& RetrieverQueryEngine
Overrides
Defined in
packages/core/src/indices/summary/index.ts:169
asRetriever
▸ asRetriever(options?
): BaseRetriever
Create a new retriever from the index.
Parameters
Name | Type |
---|---|
options? | Object |
options.mode | SummaryRetrieverMode |
Returns
Overrides
Defined in
packages/core/src/indices/summary/index.ts:156
deleteNodes
▸ deleteNodes(nodeIds
, deleteFromDocStore
): Promise
<void
>
Parameters
Name | Type |
---|---|
nodeIds | string [] |
deleteFromDocStore | boolean |
Returns
Promise
<void
>
Defined in
packages/core/src/indices/summary/index.ts:237
deleteRefDoc
▸ deleteRefDoc(refDocId
, deleteFromDocStore?
): Promise
<void
>