On 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.
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.
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.
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.