Follow-up to #2354 (HDX-4376), which added a bare-text Lucene search fallback from `implicitColumnExpression` to `bodyExpression` on log sources.
The UI flow is fixed. For consistency, the same fallback needs to be threaded through backend paths that build their own `ChartConfigWithDateRange` from a source:
- `packages/api/src/mcp/tools/query/helpers.ts` (search MCP tool + raw-SQL tile macros)
- `packages/api/src/mcp/tools/query/runEventPatterns.ts` (event-patterns sample + count configs)
- `packages/api/src/mcp/tools/query/eventDeltas.ts` (event-deltas sample config)
- `packages/api/src/tasks/checkAlerts/index.ts` (`computeAliasWithClauses`)
- `packages/api/src/tasks/checkAlerts/template.ts` (sample-log query in alert template rendering)
For each: when the source is a log source, pull `source.bodyExpression` alongside `source.implicitColumnExpression` and pass both to the chart config. Trace sources stay unchanged.
The schema change in #2354 already added `bodyExpression` to `_ChartConfigSchema` and `RawSqlChartConfigSchema`, so this is purely callsite-level plumbing.
No test coverage gap to backfill: `CustomSchemaSQLSerializerV2` itself is tested in common-utils. The callsites just need to thread the field through.
Effort: ~30 minutes, single-package (api) change.
Follow-up to #2354 (HDX-4376), which added a bare-text Lucene search fallback from `implicitColumnExpression` to `bodyExpression` on log sources.
The UI flow is fixed. For consistency, the same fallback needs to be threaded through backend paths that build their own `ChartConfigWithDateRange` from a source:
For each: when the source is a log source, pull `source.bodyExpression` alongside `source.implicitColumnExpression` and pass both to the chart config. Trace sources stay unchanged.
The schema change in #2354 already added `bodyExpression` to `_ChartConfigSchema` and `RawSqlChartConfigSchema`, so this is purely callsite-level plumbing.
No test coverage gap to backfill: `CustomSchemaSQLSerializerV2` itself is tested in common-utils. The callsites just need to thread the field through.
Effort: ~30 minutes, single-package (api) change.