Property Filter
Filter expression for property-based filtering on key-value maps.
A safe, composable expression tree that can be used for:
Metadata filtering: Applied to metadata maps
Property filtering: Applied to object property maps or typed entity fields
Guard conditions: LLM-generatable expressions for safe condition evaluation
Backends can translate this to native query syntax (Lucene field queries, Cypher WHERE clauses, etc.) and fall back to InMemoryPropertyFilter for post-filtering when native filtering isn't available.
Limitation: Nested Properties Not Supported
Filters operate on top-level properties only. Nested property paths like "address.city" or "metadata.source" are not supported. The filter key must match a direct key in the target map or a top-level property on the target object.
Kotlin users can use operator syntax for combining filters:
val filter = (eq("owner", "alice") and gte("score", 0.8)) or eq("role", "admin")
val excluded = !eq("status", "deleted")Inheritors
Types
Logical AND: all filters must match
Contains substring (case-insensitive): propertieskey.toString().lowercase().contains(value.lowercase())
Equals (case-insensitive): propertieskey.toString().lowercase() == value.lowercase()
Logical NOT: filter must not match
Logical OR: at least one filter must match
Starts with prefix: propertieskey.toString().startsWith(value)