Skip to main content

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

SummaryIndex

Overrides

BaseIndex . constructor

Source

packages/llamaindex/src/indices/summary/index.ts:62

Properties

docStore

docStore: BaseDocumentStore

Inherited from

BaseIndex . docStore

Source

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


indexStore?

optional indexStore: BaseIndexStore

Inherited from

BaseIndex . indexStore

Source

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


indexStruct

indexStruct: IndexList

Inherited from

BaseIndex . indexStruct

Source

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


serviceContext?

optional serviceContext: ServiceContext

Inherited from

BaseIndex . serviceContext

Source

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


storageContext

storageContext: StorageContext

Inherited from

BaseIndex . storageContext

Source

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

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

BaseIndex . asQueryEngine

Source

packages/llamaindex/src/indices/summary/index.ts:174


asRetriever()

asRetriever(options?): BaseRetriever

Create a new retriever from the index.

Parameters

options?

options.mode?: SummaryRetrieverMode

Returns

BaseRetriever

Overrides

BaseIndex . asRetriever

Source

packages/llamaindex/src/indices/summary/index.ts:161


deleteNodes()

deleteNodes(nodeIds, deleteFromDocStore): Promise<void>

Parameters

nodeIds: string[]

deleteFromDocStore: boolean

Returns

Promise<void>

Source

packages/llamaindex/src/indices/summary/index.ts:242


deleteRefDoc()

deleteRefDoc(refDocId, deleteFromDocStore?): Promise<void>

Parameters

refDocId: string

deleteFromDocStore?: boolean

Returns

Promise<void>

Overrides

BaseIndex . deleteRefDoc

Source

packages/llamaindex/src/indices/summary/index.ts:223


getRefDocInfo()

getRefDocInfo(): Promise<Record<string, RefDocInfo>>

Returns

Promise<Record<string, RefDocInfo>>

Source

packages/llamaindex/src/indices/summary/index.ts:256


insert()

insert(document): Promise<void>

Insert a document into the index.

Parameters

document: Document <Metadata>

Returns

Promise<void>

Inherited from

BaseIndex . insert

Source

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


insertNodes()

insertNodes(nodes): Promise<void>

Parameters

nodes: BaseNode <Metadata>[]

Returns

Promise<void>

Overrides

BaseIndex . insertNodes

Source

packages/llamaindex/src/indices/summary/index.ts:217


buildIndexFromNodes()

static buildIndexFromNodes(nodes, docStore, indexStruct?): Promise <IndexList>

Parameters

nodes: BaseNode <Metadata>[]

docStore: BaseDocumentStore

indexStruct?: IndexList

Returns

Promise <IndexList>

Source

packages/llamaindex/src/indices/summary/index.ts:202


fromDocuments()

static fromDocuments(documents, args): Promise <SummaryIndex>

Parameters

documents: Document <Metadata>[]

args= {}

args.serviceContext?: ServiceContext

args.storageContext?: StorageContext

Returns

Promise <SummaryIndex>

Source

packages/llamaindex/src/indices/summary/index.ts:131


init()

static init(options): Promise <SummaryIndex>

Parameters

options: SummaryIndexOptions

Returns

Promise <SummaryIndex>

Source

packages/llamaindex/src/indices/summary/index.ts:66