Class: VectorStoreIndex
The VectorStoreIndex, an index that stores the nodes only according to their vector embeddings.
Extends
Properties
docStore
docStore:
BaseDocumentStore
Inherited from
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:60
embedModel?
optional
embedModel:BaseEmbedding
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:68
indexStore
indexStore:
BaseIndexStore
Overrides
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:67
indexStruct
indexStruct:
IndexDict
Inherited from
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:62
serviceContext?
optional
serviceContext:ServiceContext
Inherited from
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:58
storageContext
storageContext:
StorageContext
Inherited from
Defined in
packages/llamaindex/src/indices/BaseIndex.ts:59
vectorStores
vectorStores:
VectorStoreByType
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:69
Methods
asQueryEngine()
asQueryEngine(
options
?):QueryEngine
&RetrieverQueryEngine
Create a RetrieverQueryEngine. similarityTopK is only used if no existing retriever is provided.
Parameters
• options?
• options.nodePostprocessors?: BaseNodePostprocessor
[]
• options.preFilters?: MetadataFilters
• options.responseSynthesizer?: BaseSynthesizer
• options.retriever?: BaseRetriever
• options.similarityTopK?: number
Returns
QueryEngine
& RetrieverQueryEngine
Overrides
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:285
asRetriever()
asRetriever(
options
?):VectorIndexRetriever
Create a new retriever from the index.
Parameters
• options?: Omit
<VectorIndexRetrieverOptions
, "index"
>
Returns
Overrides
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:275
buildIndexFromNodes()
buildIndexFromNodes(
nodes
,options
?):Promise
<void
>
Get embeddings for nodes and place them into the index.
Parameters
• options?
• options.logProgress?: boolean
Returns
Promise
<void
>
Defined in
packages/llamaindex/src/indices/vectorStore/index.ts:188
deleteRefDoc()
deleteRefDoc(
refDocId
,deleteFromDocStore
):Promise
<void
>