Wire FilterBar query AST into logs/timeline queries (ticket 007)
Adds a filter evaluator in engine.rs that compiles a parsed FilterExpr against the current index once per query (regex compiled once, sequence/timestamp compared directly against IngestedLog fields, other metric comparisons resolved to a HashSet<u64> of matching sequences via a bucket scan) and evaluates it per log line with no further index access. Wires this into EngineQuery::Logs/Timeline via a new LogsParams::filter/TimelineParams::filter field, and adds EngineResponse::Error so a malformed filter string surfaces as a query-level error (mapped to 400 in api.rs). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
49e8590cf3
commit
86a1a40243
+7
-1
@@ -748,7 +748,13 @@ mod tests {
|
||||
|
||||
let logs = match ask(
|
||||
&engine_tx,
|
||||
EngineQuery::Logs(LogsParams { since_sequence: None, start_ms: None, end_ms: None, limit: None }),
|
||||
EngineQuery::Logs(LogsParams {
|
||||
since_sequence: None,
|
||||
start_ms: None,
|
||||
end_ms: None,
|
||||
limit: None,
|
||||
filter: None,
|
||||
}),
|
||||
)
|
||||
.await
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user