VectorStoreFilter class sealed
Represents a filter to apply when querying a vector store collection.
VectorStoreFilter replaces the LINQ Expression<Func<TRecord, bool>>
approach from .NET with an explicit sealed-class tree that vector store
providers can pattern-match on to translate into their native query
language.
Use the static factory methods to construct filters:
final filter = VectorStoreFilter.and([
VectorStoreFilter.equalTo('category', 'hotel'),
VectorStoreFilter.anyTagEqualTo('tags', 'pool'),
]);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
and(
List< VectorStoreFilter> filters) → AndVectorStoreFilter -
Creates a filter that matches records satisfying all
filters. -
anyTagEqualTo(
String fieldName, String value) → AnyTagEqualToVectorStoreFilter -
Creates a filter that matches records where at least one element of the
collection field
fieldNameequalsvalue. -
equalTo(
String fieldName, Object? value) → EqualToVectorStoreFilter -
Creates a filter that matches records where
fieldNameequalsvalue. -
or(
List< VectorStoreFilter> filters) → OrVectorStoreFilter -
Creates a filter that matches records satisfying at least one of
filters.