mem0ai/mem0 · error · Error
Neptune Analytics list filters do not support case-insensiti
Error message
Neptune Analytics list filters do not support case-insensitive contains filters.
What it means
Neptune Analytics openCypher has no case-insensitive CONTAINS operator; the store can only emit toString(field) CONTAINS for case-sensitive matching. Because the icontains filter cannot be translated faithfully, the store throws instead of silently returning wrong-case results.
Source
Thrown at mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts:884
clauses.push(`${field} >= $${parameterName}`);
break;
case "lt":
clauses.push(`${field} < $${parameterName}`);
break;
case "lte":
clauses.push(`${field} <= $${parameterName}`);
break;
case "in":
clauses.push(`${field} IN $${parameterName}`);
break;
case "nin":
clauses.push(`NOT ${field} IN $${parameterName}`);
break;
case "contains":
clauses.push(`toString(${field}) CONTAINS $${parameterName}`);
break;
case "icontains":
throw new Error(
"Neptune Analytics list filters do not support case-insensitive contains filters.",
);
case "startsWith":
clauses.push(`toString(${field}) STARTS WITH $${parameterName}`);
break;
default:
throw new Error(
`Unsupported Neptune Analytics filter operator: ${operator}`,
);
}
}
return {
clauses,
parameters,
nextIndex,
};
}View on GitHub (pinned to 001c235229)
Solutions
- Use the case-sensitive contains operator instead and normalize the stored data and query to the same case.
- Lowercase the payload field at write time and search with contains on the lowercased value.
- Route icontains-dependent workloads to a backend that supports it (e.g. OpenSearch) or do post-filtering in application code.
Example fix
// before
filters = { city: { icontains: 'paris' } };
// after
// store lowercase payload: { city_lower: 'paris' }
filters = { city_lower: { contains: 'paris' } }; Defensive patterns
Strategy: validation
Validate before calling
const hasIcontains = (f: any): boolean =>
Object.values(f || {}).some(
(v) => v && typeof v === 'object' && 'icontains' in (v as object),
);
if (hasIcontains(filters)) throw new Error('icontains not supported on Neptune; lowercase the field instead'); Prevention
- Lowercase searchable payload fields at write time
- Do not share icontains filters across backends
- Check each backend's operator support matrix before writing filters
When it happens
Trigger: Using a filter like { memory: { icontains: 'alice' } } (any field with the icontains operator) in search or list calls against the Neptune Analytics vector store.
Common situations: Sharing filter definitions across multiple vector store backends where icontains works (e.g. OpenSearch wildcard with case_insensitive); migrating from Postgres/pgvector ILIKE-style filters; assuming SQL-like semantics carry over.
Related errors
- Unsupported filter operator: ${operator}
- Top-level entity parameters [${invalidKeys.join(", ")}] are
- Invalid ${name}: cannot be empty or whitespace-only. Provide
- Invalid ${name}: cannot contain whitespace. Provide a valid
- AND filter value must be a list of filter dicts, got ${typeo
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/1a7585c364a76332.
Report an issue: GitHub.