VectorStoreCollection<TKey,TRecord>.SearchAsync<TInput> メソッド

定義

ベクター ストアで、指定された値に似たレコードを検索します。

public abstract System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.VectorData.VectorSearchResult<TRecord>> SearchAsync<TInput>(TInput searchValue, int top, Microsoft.Extensions.VectorData.VectorSearchOptions<TRecord>? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SearchAsync : 'Input * int * Microsoft.Extensions.VectorData.VectorSearchOptions<'Record (requires 'Record : null)> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.VectorData.VectorSearchResult<'Record>>
Public MustOverride Function SearchAsync(Of TInput) (searchValue As TInput, top As Integer, Optional options As VectorSearchOptions(Of TRecord) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of VectorSearchResult(Of TRecord))

型パラメーター

TInput

類似性検索を実行する入力値の型。

パラメーター

searchValue
TInput

類似性検索を実行する値。 詳細については、「解説」セクションを参照してください。

top
Int32

返却すべき最大結果数。

options
VectorSearchOptions<TRecord>

検索の動作を制御するオプション。

cancellationToken
CancellationToken

キャンセル要求を監視する CancellationToken 。 既定値は None です。

返品

ベクター検索で見つかったレコード (結果スコアを含む)。

実装

適用対象