Probably, if your site contains more than a few hundred posts or products, or if your visitors need find results with accuracy.
To understand how WPSOLR can integrate Apache Solr and the WordPress search, let’s first dive a little bit in the hidden world of WordPress core features. If you spend a few moments understanding the following documentation, you will be much more well armed to setup WPSOLR. So, let’s go !
Here are the (simplified) standard WordPress search workflow steps, also represented in the cinematic above:
Compared to the standard WordPress search, the steps which differ are:
When the theme’s search template is loaded, it behaves as usual, unaware that the post types it gets from the WordPress standard loop came firstly from an Elasticsearch / Apache Solr query.
You probably noticed that now, 2 queries are performed instead of one in the standard search: one to the Elasticsearch / Solr index, and one to retrieve post types from the document ids.
Yet it’s much faster, because as soon as you get a significant amount of post types in your database (a few thousands, to many thousands), the Elasticsearch / Solr query is incredibly faster than a WP_Query SQL full-text search.
And the second query to retrieve post types from the ids is very fast too, as it queries on table fields ids, which are indexed.
The difficult job, the full-text search, is performed by Elasticsearch / Apache Solr, which has been built just for that.
Your searchable content in WordPress is written as texts, in long or short sentences.
It can be stored in post titles, post contents, tags, categories, product attributes. And so on.
The right tool must be able to look inside all those bits of texts, and match them to the visitor’s query.
A visitor looking for “Yellow socks” does not care if the information is stored as a WooCommerce Colour attribute, or in the product description.
He just expects results, but fast and accurate.
And “fast and accurate” is just what a full-text search is. A program that can scan huge amounts of disparate texts, and match them with precision with the query’s keywords.
When it comes to extraordinary search nowadays, two champions rise above the others: Apache Solr and Elasticsearch.
Both share the same engine, “Lucene”.
Both are built for speed and search accuracy.
Both are free and open-source: you can install them on your server for free.
Both can be tuned with thousands of parameters: linguistic in 50 languages, facets, synonyms, dictionaries, NLP. And so on.
But, more importantly, bot are seamlessly integrated to WordPress, thanks to WPSOLR plugin.
No other plugin does it: you can search with Elasticsearch in French, while searching in Japanese with Solr.
Pure plugins can improve your search speed and accuracy, up to a certain level only.
We can mention, amont others:
– AJAX Search Pro
The reason is that they still use MySQL to power your search. And as we mentioned, search is not the best asset of MySQL. It will break as soon as too much data is searched, or too many visitors are on your site. Which is bad, because you want more visitors, no?
But also, they simply cannot compete in terms of features and speed with Elasticsearch or Solr. Those 2 are beasts, built of 500K of lines of code, by hundreds of developers. And just for one purpose: providing the best search tool in the World.
So, instead of reinventing the wheel, WPSOLR chose to use Elasticsearch and Solr.
You get the best of the best, but with an easy touch. No need to be an expert in search.
And remember, we are there to configure your search with your trial. For free!
SaaS hosted search services are great, if you have a tiny site, or big pockets.
Some hosted service out there:
Their pricing is based on your usage of the service: quantity of data “indexed” (stored), number of queries, number of results, number of replicate of your data. And so on.
So, if you have few data, and few visitors, they can be very nice indeed.
But be aware that when a crawler, like GoogleBot or other bots, come visit your website search pages, it will add to your hosted bill at the end of the mont.
If you have big pockets, those services can be great. Until you want more features, more customisation of your search: you cannot open the box, because the service is hosted and you do not have access to the “engine” behind.
Also, most of these services are not dedicated to WordPress. They target all sorts of customers, including Drupal, Magento, or even HTML sites.
Which means their understanding of WordPress subtleties is quite superficial. And sometimes, they do not even provide a WordPress plugin, or just a skeleton of a plugin which is not maintained or updated as we can expect.
With WPSOLR, you get the power engine of a hosted search, thanks to Elasticsearch and Solr. But you install them for free on your server: the price can be 10-100 times less than with some well-known SaaS search companies.
It’s pretty easy to be fast, on a very expensive server with only a few documents or a few concurrent visitors
But what if you have thousands, or hundred of thousands of documents or WooCommerce products like some of our customers?
And what if on Black Friday you suddenly get hundreds of concurrent visitors, but your search breaks your server down?
And what if you do not have yet the business to spend thousands each month on expensive dedicated hardware, or hosted services?
With WPSOLR, no worries!