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:31
Properties
docStore
docStore:
BaseDocumentStore
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:27
indexStore?
optional
indexStore:BaseIndexStore
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:28
indexStruct
indexStruct:
T
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:29
serviceContext?
optional
serviceContext:ServiceContext
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:25
storageContext
storageContext:
StorageContext
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:26
Methods
asQueryEngine()
abstract
asQueryEngine(options
?):BaseQueryEngine
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:50
asRetriever()
abstract
asRetriever(options
?):BaseRetriever
Create a new retriever from the index.
Parameters
• options?: any
Returns
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:43
deleteRefDoc()
abstract
deleteRefDoc(refDocId
,deleteFromDocStore
?):Promise
<void
>
Parameters
• refDocId: string
• deleteFromDocStore?: boolean
Returns
Promise
<void
>
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:69
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:59
insertNodes()
abstract
insertNodes(nodes
):Promise
<void
>
Parameters
Returns
Promise
<void
>