Guide

ElasticPress troubleshooting

Recurring facet and search failures for editors and maintainers.

Facets not appearing

  1. Confirm the Facets Context Provider is on the template.
  2. Confirm facetName on each Facet Template matches a registered facet slug.
  3. 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

  1. Clear object cache.
  2. Reindex ElasticPress.
  3. Check disjunctive aggregation / query modifications in ElasticPress_Middleware.

Facets not updating results

  1. Keep the Query block inside the Context Provider.
  2. Confirm viewScriptModule assets load (browser console).
  3. Confirm URL params use ep_filter_* (legacy _categories-style params should 301).

Admin DataViews search misses drafts

  1. Confirm the list query sets ep_integrate (non-empty search, status is not trash-only).
  2. Reindex ElasticPress / VIP Search after draft, pending, private, and future were added to ep_indexable_post_status. Trash is not indexed.
  3. Cursor Cloud disables Elasticsearch; MySQL LIKE is 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:

  1. Do not put post_id in ep_search_fields. Elasticsearch maps it as a number, so a text term throws number_format_exception.
  2. Chart list search must not send tax_query EXISTS on chart_type. That taxonomy is not in current ES documents, so exists matches nothing.
  3. The default Working on watcher filter uses serialized meta_query LIKE, which Elasticsearch cannot match. That search stays on MySQL.
  4. Chart list search stays on MySQL. Current ES documents do not include chart_type terms, so an ES-integrated chart search returns no rows.
  5. Chart search must not LIKE post_content. Chart bodies are block JSON and table data, so terms like U.S. or Democrats match almost every chart and bury the title the editor can see. Search is post_title plus design_slug.
  6. Do not run Content_Type::make_design_slug_searchable on DataViews queries. That hook ANDs design_slug and clears s, 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;

Was this helpful?