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:403
Properties
imageSimilarityTopK
• imageSimilarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:399
index
• index: VectorStoreIndex
Defined in
packages/core/src/indices/vectorStore/index.ts:397
serviceContext
• Optional
serviceContext: ServiceContext
Implementation of
Defined in
packages/core/src/indices/vectorStore/index.ts:401
similarityTopK
• similarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:398
Methods
buildNodeListFromQueryResult
▸ buildNodeListFromQueryResult(result
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
result | VectorStoreQueryResult |
Returns
Defined in
packages/core/src/indices/vectorStore/index.ts:489
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:473