Class: SummaryIndex
A SummaryIndex keeps nodes in a sequential order for use with summarization.
Extends
Constructors
new SummaryIndex()
new SummaryIndex(
init
):SummaryIndex
Parameters
• init: BaseIndexInit
<IndexList
>
Returns
Overrides
Source
packages/core/src/indices/summary/index.ts:57
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:
IndexList
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
&RetrieverQueryEngine
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
QueryEngine
& RetrieverQueryEngine
Overrides
Source
packages/core/src/indices/summary/index.ts:169
asRetriever()
asRetriever(
options
?):BaseRetriever
Create a new retriever from the index.
Parameters
• options?
• options.mode?: SummaryRetrieverMode
Returns
Overrides
Source
packages/core/src/indices/summary/index.ts:156
deleteNodes()
deleteNodes(
nodeIds
,deleteFromDocStore
):Promise
<void
>
Parameters
• nodeIds: string
[]
• deleteFromDocStore: boolean
Returns
Promise
<void
>
Source
packages/core/src/indices/summary/index.ts:237
deleteRefDoc()
deleteRefDoc(
refDocId
,deleteFromDocStore
?):Promise
<void
>
Parameters
• refDocId: string
• deleteFromDocStore?: boolean
Returns
Promise
<void
>
Overrides
Source
packages/core/src/indices/summary/index.ts:218
getRefDocInfo()
getRefDocInfo():
Promise
<Record
<string
,RefDocInfo
>>
Returns
Promise
<Record
<string
, RefDocInfo
>>
Source
packages/core/src/indices/summary/index.ts:251
insert()
insert(
document
):Promise
<void
>
Insert a document into the index.
Parameters
• document: Document
<Metadata
>
Returns
Promise
<void
>
Inherited from
Source
packages/core/src/indices/BaseIndex.ts:96