Memory._process_metadata_filters() renames OR→$or and NOT→$not before
passing filters to the vector store. Without this fix, $or/$not keys
with list values hit _build_field_condition and crash with
ValidationError (MatchValue rejects lists).
Normalize $or→OR, $not→NOT, $and→AND at the start of _create_filter
so both naming conventions work.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Corrects the MatchText comment to accurately describe Qdrant behavior
(tokenized match with a full-text index; exact substring without one),
and adds ValueError validation when AND/OR/NOT filter values are not
lists, replacing unhelpful AttributeError crashes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wildcard '*' values now return None from _build_field_condition (match any /
field exists semantics), and _create_filter skips None conditions so a
filter containing only wildcards returns None. Updated return type annotations
to Optional[FieldCondition] and Optional[Filter] accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raise ValueError when a filter dict for a single field combines range
operators (gt/gte/lt/lte) with non-range operators (eq/ne/in/nin/etc),
preventing silent data loss where the non-range conditions were dropped.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>