Review Of WP-ElasticSearch Plugin

SearchBoxIO LogoOn my recent article discussing the search functionality within WordPress, a few folks in the comments suggested alternatives to try. One of those was the ElasticSearch plugin. My main complaint in that article was that there was not an easy way to tap into the Elastic Search service without having access to a dedicated server or VPS. This is where SearchBox.IO comes in handy. SearchBox.IO is a cloud based search platform powered by the Elastic Search technology. While there is no mention of a WordPress plugin on their site, one does exist.

Installing the plugin from the repository was easy, once I found it. After installation, you’ll need to connect the plugin to the Searchbox API server. On the configuration screen, it’s not obvious as to where you would get the API key. However, the installation instructions on the WordPress.org plugin page tell you where to go. Once you sign up for a free account, you’ll need to copy and paste the Connection URL: provided into the Elastic Server url box.

Elastic Search Configuration

Once a connection is established, you’ll see a green server status indicator. The next step is indexing posts. Before you click the Index button, you’ll need to make sure that the Default Post Index Name within the Indexing Configurations matches the index name on your Searchbox.IO account. By default, it’s WordPress but I changed mine to WPTavern. It’s worth noting that the free account only allows one Index, 3,000 documents, 10 MB of storage and something called a sleepy index. After the site is indexed, you’ll want to visit the widgets section and place the Elasticsearch Facet Widget at the top of the sidebar. It will only be displayed when someone searches your site.

ElasticSearchWidget

The widget adds the ability to narrow down a search via Tags, Categories, or Author. At this point, it’s difficult to tell when your site is using Searchbox.IO for the search query or if it’s using the local database. I have not found an easy way of figuring this out. I did send in a support query asking for some clarification, here was the response:

Q: I’ve installed and configured the WP-Elastic search plugin. However, I am having a hard time figuring out when searches are offloaded to the Searchbox.io service versus when my local database is polled. Could you please clarify this for me?

A: Plugin simply searches at searchbox and executes get requests to mysql with returned ids. Hope it is clear, let me know if you have more questions.

I have no idea what that means so if you do, please tell me in the comments.

Conclusion:

After everything was said and done, I couldn’t tell whether the searches I performed were any more relevant than the default search in WordPress. However, this plugin tied into Searchbox.IO does add the features I’m looking for in a more advanced WordPress search. One thing I really didn’t like is that each time a check box is selected for a tag, category, or author, it generated another search query. This doesn’t make any sense to me. I’d much rather see an implementation where I can configure those parameters then click on a search button or hit enter. This plugin along with the Searchbox.IO website could use more polish. It would be nice to see an entire page on their website dedicated to WordPress that explains what the plugin does, how to set it up and ultimately, how to know if it’s working.

6 Comments


  1. Hi Jeffro,

    Thanks for review and feedback about our plugin and service, we are still far behind to offer best search experience to our users however we are on the move.

    Let me clarify below phrase;

    “A: Plugin simply searches at searchbox and executes get requests to mysql with returned ids. Hope it is clear, let me know if you have more questions.”

    Plugin currently intercepts search requests done to database (typical like query) and executes a search request on SearchBox (elasticsearch). After search request is executed, server returns ids of found posts. Then we change that “like” query to select query with returned post ids.

    The design concern on this behavior was to keep search page as is. So user will be able to change it’s search back end with ease.

    That design has some drawbacks which we want to address with next releases. For instance highlighting and suggestions (did you mean) not supported yet. To include these features we need to give user to choose either current mechanism or creating a new search page which will never interact with database after search is requested (Search results will be fetched from SearchBox directly).

    Current source which we are working on has some improvements, most notable ones built in stemming configuration and auto complete. You can check it here https://github.com/searchbox-io/wp-elasticsearch.

    Ferhat

    Report


  2. get statements are sql queries. So when you search for a word say “technology” it will search at the database level and output all items which contain the word Technology.

    Hope this helps.

    Report


  3. Hi Jeffro,

    All I know is WP-Elasticsearch replaces the default WordPress search with ElasticSearch.By moving to ElasticSearch you will be able to benefit from Lucene’s capabilities which provides a more relevant search experience and you will reduce the load on your SQL server by avoiding the search on the database.

    Report

Comments are closed.