SearchAsync Method
SearchAsync(VectorValues, VectorSearchOptions)
Performs asynchronously a similarity search according to the options in the given searchOptions.
If there are many concurrent modifications during the search, it is possible but extremely unlikely to receive fewer results than requested, even when the collection contains enough items.
Declaration
Task<IVectorSearchResult<TKey, TValue>> SearchAsync(VectorValues vectorValues, VectorSearchOptions searchOptions)
Parameters
| VectorValues | vectorValues | The search vector. Can be unnamed if the collection has only one index, otherwise it has to be associated with an index name. |
| VectorSearchOptions | searchOptions | The search options. |
Returns
| Task<IVectorSearchResult<TKey, TValue>> | A task that represents the asynchronous operation. The task result contains a IVectorSearchResult<TKey, TVal> object that allows iterating over search results in order of descending similarity score. |