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/core/src/indices/vectorStore/index.ts:398
Properties
imageSimilarityTopK
imageSimilarityTopK:
number
Source
packages/core/src/indices/vectorStore/index.ts:394
index
index:
VectorStoreIndex
Source
packages/core/src/indices/vectorStore/index.ts:392
serviceContext?
optional
serviceContext:ServiceContext
Implementation of
BaseRetriever
. serviceContext
Source
packages/core/src/indices/vectorStore/index.ts:396
similarityTopK
similarityTopK:
number
Source
packages/core/src/indices/vectorStore/index.ts:393
Methods
buildNodeListFromQueryResult()
protected
buildNodeListFromQueryResult(result
):NodeWithScore
<Metadata
>[]
Parameters
• result: VectorStoreQueryResult
Returns
Source
packages/core/src/indices/vectorStore/index.ts:489
buildVectorStoreQuery()
protected
buildVectorStoreQuery(embedModel
,query
,similarityTopK
,preFilters
?):Promise
<VectorStoreQuery
>
Parameters
• embedModel: BaseEmbedding
• query: string
• similarityTopK: number
• preFilters?: MetadataFilters
Returns
Promise
<VectorStoreQuery
>
Source
packages/core/src/indices/vectorStore/index.ts:473
retrieve()
retrieve(
__namedParameters
):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• __namedParameters: RetrieveParams
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Implementation of
Source
packages/core/src/indices/vectorStore/index.ts:410
textRetrieve()
protected
textRetrieve(query
,preFilters
?):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• query: string
• preFilters?: MetadataFilters
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Source
packages/core/src/indices/vectorStore/index.ts:440
textToImageRetrieve()
private
textToImageRetrieve(query
,preFilters
?):Promise
<NodeWithScore
<Metadata
>[]>
Parameters
• query: string
• preFilters?: MetadataFilters
Returns
Promise
<NodeWithScore
<Metadata
>[]>