GetAsync(Expression<Func<Dictionary<string, object?>, bool>>, int,<Dictionary<string, object?>>?, CancellationToken )

This method retrieves from the vector store records matching a filter expression. It does not guarantee the existence of the collection.

Declaration

// C#
public async IAsyncEnumerable<Dictionary<string, object?>?> GetAsync(Expression<Func<Dictionary<string, object?>, bool>> filter, int top, FilteredRecordRetrievalOptions<Dictionary<string, object?>>? options = null, CancellationToken cancellationToken = default);

Parameter

  • filter

    Predicate for filtering the records.

  • top

    Maximum number of results to return.

  • options

    Optional options for retrieving the records.

  • cancellationToken

    The cancellation token.

Return Value

IAsyncEnumerable<Dictionary<string, object?>?> object representing the records matching the provided predicate.

Implements

Microsoft.Extensions.VectorData.VectorStoreCollection

Exceptions

VectorStoreException: The command fails to execute for any reason other than the absence of a record.

Remarks

The filter cannot compare the following unsupported columns types:
  • BFile
  • Blob
  • Clob
  • Json
  • NClob
  • Vector
  • Vector_Binary
  • Vector_Float32
  • Vector_Float64
  • Vector_Int8
  • XmlType

Unlike OracleCollection , OracleDynamicColloection uses Object as TKey , and Dictionary<string, object?> as TRecord. Ensure to use the correct parameter types for the filter and options: Dictionary<string, object?>.