@nhtio/adk/batteries/vector/filters
Filter types and evaluator for the vector battery.
Interfaces
| Interface | Description |
|---|---|
| FilterCondition | A single field comparison: field op value. |
| FilterGroup | A boolean combination of nested filters. Exactly one of and/or/not is meaningful. |
| RawExpr | A raw, adapter-dialect filter expression: literal text plus positional bindings. |
| RawFilter | An adapter-dialect raw filter forwarded to the backend verbatim. |
Type Aliases
| Type Alias | Description |
|---|---|
| FilterOperator | A comparison operator usable in a FilterCondition. |
| VectorFilter | Any filter node: a FilterCondition, a FilterGroup, or a RawFilter. |
Variables
| Variable | Description |
|---|---|
| vectorFilterSchema | Recursive validator schema for any VectorFilter (condition, raw, or nested group). |
Functions
| Function | Description |
|---|---|
| evaluateFilter | Evaluate a VectorFilter against a record's metadata in memory — the reference semantics adapters must match for client-side filtering and conformance. |
| isFilterCondition | Type guard: true if f is a FilterCondition. |
| isFilterGroup | Type guard: true if f is a FilterGroup (neither a condition nor a raw filter). |
| isRawExpr | Type guard: true if v is a RawExpr. |
| isRawFilter | Type guard: true if f is a RawFilter. |
| raw | Construct a RawExpr from literal text and optional positional bindings. |