Class: VectorStoreIndex
The VectorStoreIndex, an index that stores the nodes only according to their vector embedings.
Hierarchy
Constructors
constructor
• new VectorStoreIndex(init
): VectorStoreIndex
Parameters
Name | Type |
---|---|
init | VectorIndexConstructorProps |
Returns
Overrides
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:70
Properties
docStore
• docStore: BaseDocumentStore
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:157
embedModel
• embedModel: BaseEmbedding
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:66
imageEmbedModel
• Optional
imageEmbedModel: MultiModalEmbedding
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:68
imageVectorStore
• Optional
imageVectorStore: VectorStore
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:67
indexStore
• indexStore: BaseIndexStore
Overrides
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:65
indexStruct
• indexStruct: IndexDict
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:160
serviceContext
• serviceContext: ServiceContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:155
storageContext
• storageContext: StorageContext
Inherited from
Defined in
packages/core/src/indices/BaseIndex.ts:156
vectorStore
• vectorStore: VectorStore
Overrides
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:64
Methods
asQueryEngine
▸ asQueryEngine(options?
): BaseQueryEngine
& RetrieverQueryEngine
Create a new query engine from the index. It will also create a retriever and response synthezier if they are not provided.
Parameters
Name | Type | Description |
---|---|---|
options? | Object | you can supply your own custom Retriever and ResponseSynthesizer |
options.nodePostprocessors? | BaseNodePostprocessor [] | - |
options.preFilters? | MetadataFilters | - |
options.responseSynthesizer? | BaseSynthesizer | - |
options.retriever? | BaseRetriever | - |
Returns
BaseQueryEngine
& RetrieverQueryEngine
Overrides
Defined in
packages/core/src/indices/vectorStore/VectorStoreIndex.ts:268