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
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
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
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
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
>[]>