Skip to main content

Class: VectorIndexRetriever

Retrievers retrieve the nodes that most closely match our query in similarity.

Implements

Constructors

new VectorIndexRetriever()

new VectorIndexRetriever(__namedParameters): VectorIndexRetriever

Parameters

__namedParameters: VectorIndexRetrieverOptions

Returns

VectorIndexRetriever

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:399

Properties

filters?

optional filters: MetadataFilters

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:397


index

index: VectorStoreIndex

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:393


serviceContext?

optional serviceContext: ServiceContext

Deprecated

to be deprecated soon

Implementation of

BaseRetriever.serviceContext

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:396


topK

topK: TopKMap

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:394

Accessors

similarityTopK

set similarityTopK(similarityTopK): void

@deprecated, pass similarityTopK or topK in constructor instead or directly modify topK

Parameters

similarityTopK: number

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:417

Methods

buildNodeListFromQueryResult()

protected buildNodeListFromQueryResult(result): NodeWithScore<Metadata>[]

Parameters

result: VectorStoreQueryResult

Returns

NodeWithScore<Metadata>[]

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:479


retrieve()

retrieve(__namedParameters): Promise<NodeWithScore<Metadata>[]>

Parameters

__namedParameters: RetrieveParams

Returns

Promise<NodeWithScore<Metadata>[]>

Implementation of

BaseRetriever.retrieve

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:422


retrieveQuery()

protected retrieveQuery(query, type, vectorStore, filters?): Promise<NodeWithScore<Metadata>[]>

Parameters

query: MessageContent

type: ModalityType

vectorStore: VectorStore

filters?: MetadataFilters

Returns

Promise<NodeWithScore<Metadata>[]>

Defined in

packages/llamaindex/src/indices/vectorStore/index.ts:450