Skip to content

Transition from Jetpack Search to Enterprise Search

Sites that are currently using Jetpack Search can transition to using Enterprise Search instead.

By following the steps outlined below, sites that are currently using Jetpack Search—and already launched and serving traffic—can avoid search downtime.

Enable Enterprise Search

  1. Enable Enterprise Search by adding the VIP_ENABLE_VIP_SEARCH constant to vip-config.php and defining it as true. This will initiate the indexing of new, incremental changes without affecting Jetpack Search.
  2. Create an index for the existing site content.
  3. If needed, create allow lists to define what is indexed.
  4. Verify that the newly created index is reporting good health and test search queries.

It is recommended to look for any usages of the filters jetpack_search_es_wp_query_args or jetpack_search_es_query_args in the codebase and modify them to use the equivalent ep_formatted_args_query or ep_formatted_args. Because the Elasticsearch queries are not 1:1 for Jetpack and Enterprise Search, any alterations that are made should be tested.

Transition to Enterprise Search

Once it is determined that the site is ready to transition off of its current Elasticsearch service into Enterprise Search.

  1. Add the VIP_ENABLE_VIP_SEARCH_QUERY_INTEGRATION constant to vip-config.php and define it as true. This will automatically send front-end search queries directly to Enterprise Search and disable the Jetpack Search module.
  2. Verify that Enterprise Search is sending its queries to Elasticsearch by using Search Dev Tools.
  3. Disable and remove all other Elasticsearch-backed functionality such as Jetpack Search, the es-wp-query adapter, or other variants of Elasticsearch. Enterprise Search uses forks of es-wp-query and ElasticPress that are loaded automatically. No other Elasticsearch-backed functionality can be supported while Enterprise Search is enabled.
  4. If application code was added to make search endpoint calls to the public API (e.g.<site ID>/search), modify the code to use the WordPress core REST API instead. For example:<search term>.

After transitioning to Enterprise Search, monitor for signs of conflicts, PHP warnings, or issued notices by using debugging tools such as

Jetpack migration support path

define( 'VIP_SEARCH_MIGRATION_SOURCE', 'jetpack' );

For sites that are using the jetpack_sync_post_meta_whitelist filter, the constant VIP_SEARCH_MIGRATION_SOURCE can be added to vip-config.php and defined as jetpack. Jetpack’s default post meta allow list, and the values that are being filtered will be used as a base in the post meta allow list.

Last updated: December 22, 2023

Relevant to

  • WordPress