-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Milestone
Description
The sift implementation currently uses positional assumptions on what you intend to filter.
To decode what that means, a filter argument is of the form filter: { title: { wildcard: "*tion" }}.
This assumes that the last keyname of the deepest nested object is the comparitor function, in this case it means, "use the regex wildcard function", and filters by the title field for all tuples matching the value *tion.
This assumption breaks down when you need to compare a field of an object on an array.
If we have an authors field on a Posts collection, we could imagine that data would be an array of author objects.
- the syntax of
filter: { authors: { name: { wildcard: "*tion" }}}isn't valid - nor is
filter: { authors: { wildcard: { name: "*tion" }}}