Skip to content

Slow and Expensive Enterprise Search Queries in Application Logs


25 August 2026

19:17:50 GMT+0000

Enterprise Search now emits throttled, customer-visible warnings after successful Elasticsearch requests when a query takes longer than 200 ms or does not contain a limiting condition. Each occurrence produces a stable machine-readable entry and a human-readable explanation containing the originating URL and customer-code location. Similar query families are deduplicated for five minutes, with up to five warning pairs emitted per site during that window.

The defaults can be adjusted with these filters:

add_filter( 'vip_search_slow_query_threshold_ms', static fn(): int => 300 );
add_filter( 'vip_search_query_warning_dedupe_window_s', static fn(): int => 600 );
add_filter( 'vip_search_query_warning_budget', static fn(): int => 10 );

vip_search_slow_query_threshold_ms: defaults to 200; accepts 15000.

vip_search_query_warning_dedupe_window_s: defaults to 300; accepts 603600.

vip_search_query_warning_budget: defaults to 5; accepts 1100.

https://github.com/Automattic/vip-go-mu-plugins/pull/7114