Class: VectorIndexRetriever
Retrievers retrieve the nodes that most closely match our query in similarity.
Implements
Constructors
constructor
• new VectorIndexRetriever(«destructured»
): VectorIndexRetriever
Parameters
Name | Type |
---|---|
«destructured» | VectorIndexRetrieverOptions |
Returns
Defined in
packages/core/src/indices/vectorStore/index.ts:421
Properties
imageSimilarityTopK
• imageSimilarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:418
index
• index: VectorStoreIndex
Defined in
packages/core/src/indices/vectorStore/index.ts:416
serviceContext
• Private
Optional
serviceContext: ServiceContext
Defined in
packages/core/src/indices/vectorStore/index.ts:419
similarityTopK
• similarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:417
Methods
buildNodeListFromQueryResult
▸ buildNodeListFromQueryResult(result
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
result | VectorStoreQueryResult |
Returns
Defined in
packages/core/src/indices/vectorStore/index.ts:518
buildVectorStoreQuery
▸ buildVectorStoreQuery(embedModel
, query
, similarityTopK
, preFilters?
): Promise
<VectorStoreQuery
>
Parameters
Name | Type |
---|---|
embedModel | BaseEmbedding |
query | string |
similarityTopK | number |
preFilters? | MetadataFilters |
Returns
Promise
<VectorStoreQuery
>
Defined in
packages/core/src/indices/vectorStore/index.ts:502
getServiceContext
▸ getServiceContext(): undefined
| ServiceContext
Returns
undefined
| ServiceContext
Implementation of
BaseRetriever.getServiceContext
Defined in
packages/core/src/indices/vectorStore/index.ts:542