Skip to main content

Migration details

v5 uses one optional singular filter field for search, profiles, and list operations.

Shape

Fields may contain letters, numbers, _, ., 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

  1. Rename outer filters to filter.
  2. Recursively replace AND/OR objects with { operator, operands }.
  3. Rename key to field.
  4. Convert legacy flags into one explicit operator.
  5. Keep numeric values as JSON numbers rather than numeric strings.
  6. Remove legacy filterType, negate, numericOperator, and ignoreCase keys.

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 filter preserves unfiltered behavior.