Recurring facet and search failures for editors and maintainers.
Facets not appearing
- Confirm the Facets Context Provider is on the template.
- Confirm
facetNameon each Facet Template matches a registered facet slug. - Verify ElasticPress / VIP Search is healthy and the query is marked for facets (
isPubListingQuery/ep_is_facetable).
Empty or disabled facet sidebar
When Elasticsearch is degraded, shells stay visible but disabled (isDisabled). Visibility SQL still runs; facet filters are not re-applied on MySQL. Fix ES health rather than the block markup.
Incorrect counts
- Clear object cache.
- Reindex ElasticPress.
- Check disjunctive aggregation / query modifications in
ElasticPress_Middleware.
Facets not updating results
- Keep the Query block inside the Context Provider.
- Confirm
viewScriptModuleassets load (browser console). - Confirm URL params use
ep_filter_*(legacy_categories-style params should 301).
Admin DataViews search misses drafts
- Confirm the list query sets
ep_integrate(non-empty search, status is not trash-only). - Reindex ElasticPress / VIP Search after
draft,pending,private, andfuturewere added toep_indexable_post_status. Trash is not indexed. - Cursor Cloud disables Elasticsearch; MySQL
LIKEis the expected fallback there.
Admin DataViews search returns no rows for a title that is on screen
A reindex does not fix this. These query bugs return an empty list even when MySQL would match:
- Do not put
post_idinep_search_fields. Elasticsearch maps it as a number, so a text term throwsnumber_format_exception. - Chart list search must not send
tax_queryEXISTSonchart_type. That taxonomy is not in current ES documents, soexistsmatches nothing. - The default Working on watcher filter uses serialized
meta_queryLIKE, which Elasticsearch cannot match. That search stays on MySQL. - Chart list search stays on MySQL. Current ES documents do not include
chart_typeterms, so an ES-integrated chart search returns no rows. - Chart search must not LIKE
post_content. Chart bodies are block JSON and table data, so terms likeU.S.orDemocratsmatch almost every chart and bury the title the editor can see. Search ispost_titleplusdesign_slug. - Do not run
Content_Type::make_design_slug_searchableon DataViews queries. That hook ANDsdesign_slugand clearss, so title search returns no rows in the browser REST request.
Numeric ID search uses WP_Query post__in. Chart type filters still apply when the user picks a type. The Working on chip still intersects search: a title that is not on your watch list will not appear while that filter is on.
Slow performance
Enable object caching. Confirm listing/search queries set ep_integrate. Watch for MySQL LIKE fallbacks when EP is off the path.
Spammy search terms with consecutive ++ should 301 to / in vip-config/redirects.php before WordPress boots. Facet aggregations skip past page 100 (MAX_NAVIGABLE_PAGE); result pagination still follows the ES max result window. If junk search URLs still hit origin and PHP-FPM climbs, confirm the vip-config nonsense-term redirect.
Debug switches
define( 'PRC_ELASTICPRESS_DEBUG', true );
window.prcFacetsDebug = true;