WeaviateVectorStoreRecordCollection<TRecord>.GetBatchAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a batch of records from the vector store. Does not guarantee that the collection exists. Gets will be made in a single request or in a single parallel batch depending on the available store functionality. Only found records will be returned, so the resultset may be smaller than the requested keys. Throws for any issues other than records not being found.
public System.Collections.Generic.IAsyncEnumerable<TRecord> GetBatchAsync (System.Collections.Generic.IEnumerable<Guid> keys, Microsoft.SemanticKernel.Data.GetRecordOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetBatchAsync : seq<Guid> * Microsoft.SemanticKernel.Data.GetRecordOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Record (requires 'Record : null)>
override this.GetBatchAsync : seq<Guid> * Microsoft.SemanticKernel.Data.GetRecordOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Record (requires 'Record : null)>
Public Function GetBatchAsync (keys As IEnumerable(Of Guid), Optional options As GetRecordOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TRecord)
Parameters
- keys
- IEnumerable<Guid>
The unique ids associated with the record to get.
- options
- GetRecordOptions
Optional options for retrieving the records.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The records associated with the unique keys provided.