Migration details
v5 uses one optional singularfilter field for search, profiles, and list operations.
Shape
_, ., and -. Expressions allow up to five nested levels and 200 operands per logical group.
Operator mapping
Before and after
With the SDK
filter is a typed object under body, not a JSON string. The same shape works in supermemory.list and supermemory.profile. Keys are literal: customer.plan is one field name, not a nested path.
Deterministic conversion
- Rename outer
filterstofilter. - Recursively replace
AND/ORobjects with{ operator, operands }. - Rename
keytofield. - Convert legacy flags into one explicit operator.
- Keep numeric values as JSON numbers rather than numeric strings.
- Remove legacy
filterType,negate,numericOperator, andignoreCasekeys.
Verification
- Compare result IDs for equality, inequality, contains, numeric, array, nested AND, and nested OR fixtures.
- Add negative tests: legacy shapes, empty operands, incompatible value types, and unknown keys must return
400. - Confirm omitted
filterpreserves unfiltered behavior.