This step enables Enterprise Search integration with the default allow lists.
Code changes required
Add the following constant defines to
vip-config.php (the equivalent to adding them to
define( 'VIP_ENABLE_VIP_SEARCH', true ); define( 'VIP_ENABLE_VIP_SEARCH_QUERY_INTEGRATION', true );
If you are indexing a multisite, add the below as well:
define( 'EP_IS_NETWORK', true );
These are the code changes required to have Elasticsearch (ES) index your content and offload standard (search) queries.
Once you have enabled Enterprise Search in code, you will need to index!
Alternative Elasticsearch components
Disable and remove all other Elasticsearch-backed functionality. If you previously used Jetpack Search, the es-wp-query adapter, or another variant of ES, you’ll also need to remove them, as no other Elasticsearch backed functionality is supported while Enterprise Search is enabled. Additionally, Enterprise Search uses forks of es-wp-query and ElasticPress that are loaded automatically.
If there are conflicts, PHP warnings or notices should be issued; check New Relic’s error logs for these.
Migrating to Enterprise Search
If you are converting from standard WordPress search or Jetpack Search to WordPress VIP’s Enterprise Search, and your site is already live and serving traffic, you can avoid search downtime by enabling just Enterprise Search first (with the
VIP_ENABLE_VIP_SEARCH constant), which will start indexing new, incremental changes without affecting Jetpack. Note: You will still need to run an index for the existing site content.
Continue to follow this guide in setting up your allow lists and indexes. Once those are ready and reporting good health, you can remove the Jetpack Search components noted above.
VIP_ENABLE_VIP_SEARCH_QUERY_INTEGRATION sends search queries directly to Enterprise Search.
If you’re on a multisite, it’ll be easier and more reliable to set up all subsites at the same time. Also, we recommend reviewing our tips for multisites.
Testing search queries
Queries sent to Enterprise Search can be tested without defining the
VIP_ENABLE_VIP_SEARCH_QUERY_INTEGRATION constant by adding the query string
&vip-search-enabled=1 to the end of a URL.
For example, to test Enterprise Search with the search term “test” the full URL would be: