WP Engine Smart Search

WP Engine Smart Search is an Add-on for WP Engine customers that improves website searches for traditional and headless WordPress applications. 

With WP Engine Smart Search, you can guide your website visitors to your most important content with an intuitive, typo-tolerant search function that surfaces more relevant results — even if it’s your custom post types. No coding necessary.


About

WP Engine Smart Search is an advanced search solution that’s designed to: 

  • Increase search result relevancy through content prioritizing and weighting
  • Support advanced search query operators
  • Add support for advanced WordPress data types

After purchasing and enabling on the environment of your choice via the User Portal, the WP Engine Smart Search WordPress plugin will be installed automatically.


Licensing

Licenses are currently available for Premium and Atlas plans. 

To purchase a license for your Premium plan, contact our Sales team or your Account Manager for assistance. 

To purchase a license for your Atlas plan, you can either select WP Engine Smart Search as an Add-on when signing up for your plan, or you can purchase it through the Add-ons page of your existing plan.

You are granted an unlimited number of licenses per site when you sign up for WP Engine Smart Search. And after purchase, you can install WP Engine Smart Search on as many sites as your plan allows.


Enable

To enable WP Engine Smart Search on an environment: 

  1. Log into the User Portal
  2. Choose Add-ons in the left menu
  3. Click Manage in the WP Engine Smart Search box
Image of enabled Add-Ons in WP Engine portal
  1. Click Select environments
Select environments button
  1. Check the box(es) of the environment(s) you want to enable and click Add environment
Add Environment checkbox and button
  1. Click Confirm to complete the licensing process
WP Engine Smart Search enablement confirmation popup

After confirmation, you’ll be returned to the WP Engine Smart Search page where you can see all the enabled environments, as well as the status for each site.

Also, the plugin will be automatically installed on your selected environment(s). 

Note: It may take a few minutes for the plugin to install on your site. Wait for the Status icon to change from Pending to Ready to Use (indicated by a green check mark) before logging into your WP Admin. (This page will update automatically when your install is complete.)

List of environments licensed for WP Engine Smart Search and their status

Remove a License

If you wish to remove a license from an environment:

  1. Log into your User Portal.
  2. Click Add-ons
  3. Click Manage in the WP Engine Smart Search box
  4. Click the 3-dot Actions icon to reveal more options
  5. Click Release License
Release License button

Content Sync

NOTE

WP Engine Smart Search requires a one-time content sync before adjusting any other plugin settings. Otherwise, errors may occur in future syncs.

A content (or data) sync sends all pre-existing content on your WordPress site to WP Engine Smart Search for indexing. This ensures the plugin knows exactly what content exists so it can serve the best results to your users.

To run the content sync:

  1. Log into your WP Admin dashboard 
  2. Go to WP Engine Smart Search > Sync
  3. Click Synchronize Now
Synchronize Now button

This sync can take some time to complete, especially on websites with large amounts of data (up to and beyond 30 minutes for the largest websites so please be patient. After the first sync, your content will stay up-to-date in our index automatically). 

After the sync is complete:

  • All searches on your WordPress site will be served by WP Engine Smart Search without any additional configuration
  • WP Engine Smart Search will continue to sync data in real-time any time new content is added or existing content is edited

NOTE

If the WP Engine Search plugin is deactivated or uninstalled, real-time syncing won’t occur.

Delete Sync Data

If you run into any issues with the content sync, you may need to delete the current search data and then sync again. 

To delete sync data:

  1. Log into your WP Admin dashboard 
  2. Go to WP Engine Smart Search > Sync
  3. Click Delete search data
  4. When the deletion is complete, click Synchronize Now to run the sync again
Delete search data button

Configure WP Engine Smart Search

After you’ve performed the first content sync, you can configure the WP Engine Smart Search settings. These settings give you the most control over your search data. 

To configure the settings:

  1. Log into your WP Admin dashboard 
  2. Click WP Engine Smart Search > Search Config
WP Engine Smart Search Config screen

Search Method

WP Engine Smart Search provides two methods for searching, Stemming and Fuzzy, which you can use to fine tune the way search works on your website.

  • Stemming Search
Stemming search title

Stemming is the process of reducing a word to its root form or base word. This is the default search method of WP Engine Smart Search.

Stemming Search increases search relevancy because the plugin searches for both an exact match of what was typed into the search form, as well as a match of the stemmed (or root) word.

For example, if a user types in running, the results will include all content that contains the word running – the exact word they typed. But the results will ALSO include all content that contains the word run – the stemmed (or root) word.

  • Fuzziness Search
Fuzziness search title

The Fuzzy Search method, which you can toggle on or off, can be used as an alternative to stemming search.

NOTE

If Fuzziness is toggled ON, the default Stemming search method will be disabled.

Fuzziness uses a letter-per-word tolerance (or “distance”) in the search terms to handle typos in the search. This means you can use the slider to specify the fuzzy distance (1 or 2), which determines how many letters can be wrong in each word users type into the search form.

Fuzzy distance slider

For example, if you set the Fuzzy distance to 1, a search for “Hallo Warld” would return results for both “Hello” and “World.” (Each misspelled word in this example contains only one wrong letter.)

If you set the Fuzzy distance to the maximum distance of 2, a search for “Haalo Waald” would return results for both “Hello” and “World.” (Each misspelled word in this example contains only two wrong letters.)

NOTE

A higher fuzzy distance allows for a better search experience with more relevant results.


Prioritize Content in Searches

The words users search for on your website may appear in various locations throughout the content. For example, a word might appear in a title, post content, custom fields, etc.

By default, WP Engine Smart Search searches all supported WordPress data type objects (such as Posts, Pages, CPTs, ACFs, etc.) by all of their supported fields (such as string, number, boolean, and other WordPress Data Type objects).

You may, however, wish to limit what data can be searched or give more importance to certain fields to ensure highly relevant results. You can do this by using the Searchable checkboxes and the Weight sliders.

Searchable checkboxes and Weight sliders
  • Searchable Checkboxes
    The searchable checkboxes allow for the inclusion/exclusion of a field from the search. Check the items you want to be searchable and uncheck the items you don’t want to be searchable. 

    For example, if you want search results to only include posts that contain the search term in post titles, you could check the post_title box and uncheck all the rest.
  • Weight Sliders
    The field-level weight sliders allow for some fields to be considered more relevant than others when determining the order of search results. Use the sliders to assign different weights to the searchable data fields. A field with a higher weight will be given a higher priority in the search results. 

    For example, if you set post_content to 20 and post_title to 10, the posts containing the search term in the content will appear before the posts where only the titles contain the search term.

After adjusting the settings here, be sure to click the Save Config button.


Atlas Platform Users

WP Engine Smart Search is headless-ready – without 3rd party vendors or complex integrations.

Setup on Atlas is just as easy as on a traditional WordPress site, and it comes with built-in headless search support, including WP GraphQL and ACF.

Installation for Atlas

As mentioned previously, WP Engine Smart Search can be installed automatically when applying a license to your environments (See Enable above).

Or you may wish to install the plugin through Atlas Blueprints.

The Atlas Blueprints pipeline will have:

NOTE

When using the Atlas Blueprint method to install WP Engine Smart Search, you must apply a license to the environment where it’s installed to receive valid settings and to use the plugin.

Prerequisites for Atlas

The WPGraphQL plugin is required when using WP Engine Smart Search on the Atlas Platform.

  • Debug Information
    WP Engine Smart Search adds debug information to WPGraphQL queries. To enable this, go to the WPGraphQL settings page and check the Enable GraphQL Debug Mode setting.
Checkbox to enable GraphQL Debug Mode
  • Query Monitoring for non-WPGraphQL users
    WP Engine Smart Search works seamlessly with the Query Monitor plugin for non-WPGraphQL users (see Debug Information above for how to access logs if you are using WPGraphQL).

    The query monitoring plugin will allow users to view detailed information about the WP Engine Smart Search queries being made on their site, including the query string, the time it took to execute the query, and more. This information can be used to optimize search performance and ensure that searches are working as expected.

    To use Query Monitor with WP Engine Smart Search, follow these steps:
    • Install the Query Monitor plugin on your WordPress site.
    • Activate the plugin.
    • Click the Query Monitor that has appeared in your WordPress Admin top menu.
    • In the dashboard that appears, click on Logs.
    • Run WP Engine Smart Search and see the data appear.

Querying with WP Engine Smart Search

After applying a license to your site and running your initial content sync, WP Engine Smart Search takes over the default WordPress search functionality and serves all your site’s search content.

The WPGraphQL plugin is a good place to test search queries. WPGraphQL provides a ‘GraphiQL IDE’ in the WordPress dashboard where you can interact with the WPGraphQL Schema in the browser. WP Engine Smart Search overrides the default search functionality for WPGraphQL queries on all WP Engine Smart Search supported WordPress data types.

Below is a screenshot of the WPGraphQL plugin & GraphiQL IDE view, where WP Engine Smart Search has overridden the default WP search behavior, followed by some sample queries:

GraphiQL IDE view of WPGraphQL plugin

Querying Standard WordPress Data Types

Here are examples of querying standard WordPress data types (Posts, Pages, and Custom Post Types (CPT)):

  • Querying Posts/Pages:
{
  {either "posts" or "pages"}(where: {search: "CSS"}) {
    nodes {
      id
      status
      title
    }
  }
}
  • Querying Custom Post Types:
{
  branches(where: { search: "Austin" }) {
    nodes {
      address
    }
  }
}

Querying for various post types and ACF fields

Note: WP Engine Smart Search has stopped support for ACM since version v.0.2.14.

WP Engine Smart Search also integrates with the Advanced Custom Fields (ACF) plugin.

Here is an example of querying for a custom data type:

  • Querying ACF type of project, with fields of streetAddress, contactName & workOrderNumber:
{
  projects(where: { search: "Austin" }) {
    nodes {
      streetAddress
      contactName
      workOrderNumber
    }
  }
}

Advanced Query Example

You can query fields that appear on the plugin’s Search Config page, including ACF fields, tags and categories, etc. Consider the following query:

seats.count:>4 tags.name:Cars hello AND world OR 123 4.56

This search string uses a combination of search terms and filters.

It searches for records that match the following criteria:

  • The seats.count field has a value greater than 4.
  • The tags.name field contains the value Cars.
  • The text “hello” appears in the record.
  • The text “world” appears in the record.
  • The record contains either the number 123 or the number 4.56.

The search string uses the following syntax:

  • Search terms: Any word that does not contain a special character is considered a search term. In this example, “hello” and “world” are search terms.
  • Filters: A filter is used to search for records that meet specific criteria. Filters are specified using the format <field name>: <value>. In this example, seats.count:>4 and tags.name: Cars are filters. The seats.count filter searches for records where the value of the seats.count field is greater than 4, while the tags.name filter searches for records where the tags.name field contains the value Cars.
  • Logical operators: The search string uses the logical operators AND and OR to combine search terms and filters. The AND operator is used to require that both search terms or filters appear in a record, while the OR operator is used to search for records that contain either one or the other.

Order By

Currently, we support ordering by the following fields: DATE, MODIFIED. Also, these should be provided in the order direction: ASC, DESC. If orderby is not provided, the default weighting policy is applied – which is shaped by Search Config weights.

  • Querying posts, order by DATE DESC :
graphql
{
  posts(where: {search: "CSS", orderby: [ { field: DATE, order: DESC} ] }) {
    nodes {
      id
      status
      title
    }
  }
}
  • Querying ACF type of project, with fields of streetAddress, contactName & workOrderNumber, ordered by MODIFIED ASC. In the event of the same modified date, further sort them in descending order of DATE :
graphql
{
    projects(where: { search: "Austin" , orderby: [ { field: MODIFIED, order: ASC}, { field: DATE, order: DESC}] }) {
        nodes {
            streetAddress
            contactName
            workOrderNumber
        }
    }
}

Query Operators

WP Engine Smart Search treats spaces as an OR operator by default, whereas the default WordPress search treats spaces as an AND operator. With WP Engine Smart Search, you can explicitly specify the AND, OR and NOT keywords within your search query and you can combine them too. This provides enhanced specificity for your querying needs.

Here is an example of querying using different search operators:

  • Using NOT search operator:
{
  projects(where: { search: "Austin NOT Minnesota" }) {
    nodes {
      streetAddress
      contactName
      workOrderNumber
    }
  }
}
  • Using AND search operator:
{
  projects(where: { search: "New York AND Texas" }) {
    nodes {
      streetAddress
      contactName
      workOrderNumber
    }
  }
}
  • Using OR search operator:
{
  projects(where: { search: "New York OR Texas" }) {
    nodes {
      streetAddress
      contactName
      workOrderNumber
    }
  }
}

Public APIs

The Public APIs give you the ability to interact with WP Engine Smart Search programmatically.

  • The GraphQL Search API (also known as Find API) allows you to search for documents in an index based on specific parameters.
  • The GraphQL Index and Delete API includes mutations for creating, updating, or deleting documents.

You can access the API documentation here: 

NOTE: These APIs and their endpoints are in BETA. Beta Services are described in Section 2.e. of our terms of service.

Still need help? Contact support!

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to your account to get expert one-on-one help.

The best in WordPress hosting.

See why more customers prefer WP Engine over the competition.