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
Source
packages/llamaindex/src/indices/vectorStore/index.ts:395
Properties
index
index:
VectorStoreIndex
Source
packages/llamaindex/src/indices/vectorStore/index.ts:390
serviceContext?
optional
serviceContext:ServiceContext
Implementation of
BaseRetriever
. serviceContext
Source
packages/llamaindex/src/indices/vectorStore/index.ts:393
topK
topK:
TopKMap
Source
packages/llamaindex/src/indices/vectorStore/index.ts:391
Accessors
similarityTopK
set
similarityTopK(similarityTopK
):void
@deprecated, pass topK in constructor instead
Parameters
• similarityTopK: number
Source
packages/llamaindex/src/indices/vectorStore/index.ts:407
Methods
buildNodeListFromQueryResult()
protected
buildNodeListFromQueryResult(result
):NodeWithScore
<Metadata
>[]
Parameters
• result: VectorStoreQueryResult
Returns
Source
packages/llamaindex/src/indices/vectorStore/index.ts:478
retrieve()
retrieve(
__namedParameters
):Promise
<NodeWithScore
<Metadata
>[]>