Class: abstract
BaseIndex<T>
Indexes are the data structure that we store our nodes and embeddings in so they can be retrieved for our queries.
Extended by
Type Parameters
• T
Constructors
new BaseIndex()
new BaseIndex<
T
>(init
):BaseIndex
<T
>
Parameters
• init: BaseIndexInit
<T
>
Returns
BaseIndex
<T
>
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:64
Properties
docStore
docStore:
BaseDocumentStore
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:60
indexStore?
optional
indexStore:BaseIndexStore
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:61
indexStruct
indexStruct:
T
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:62
serviceContext?
optional
serviceContext:ServiceContext
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:58
storageContext
storageContext:
StorageContext
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:59
Methods
asQueryEngine()
abstract
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.responseSynthesizer?: BaseSynthesizer
• options.retriever?: BaseRetriever
Returns
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:83
asRetriever()
abstract
asRetriever(options
?):BaseRetriever
Create a new retriever from the index.
Parameters
• options?: any
Returns
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:76
deleteRefDoc()
abstract
deleteRefDoc(refDocId
,deleteFromDocStore
?):Promise
<void
>
Parameters
• refDocId: string
• deleteFromDocStore?: boolean
Returns
Promise
<void
>
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:102
insert()
insert(
document
):Promise
<void
>
Insert a document into the index.
Parameters
• document: Document
<Metadata
>
Returns
Promise
<void
>
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:92
insertNodes()
abstract
insertNodes(nodes
):Promise
<void
>
Parameters
Returns
Promise
<void
>