WPSolr logo
Search
Close this search box.

Table of contents :

How Relevanssi works compared to the default WordPress search?

The relevanssi logo

Table of contents :

Since forever, websites have offered search functionalites to help their users find the content they need. It is no different for WordPress websites. A good WordPress search is invaluable since it increases user engagement and reduces frustration.

Well WordPress offers a default search. But is it a good idea to use it? Well apparently not enough since Relevanssi exists. Relevanssi is a WordPress search plugin that replaces the default search with a more refined and efficient one.

If you want to learn about more WordPress search plugins, you could check out our list.

 

Which features does Relevanssi add ?

Index any WordPress data type

The default WordPress search doesn’t offer configuration options, even choosing which data is searchable is not possible. This type of feature is important since, depending on your industry, you may want to prioritize certain content types or exclude irrelevant data from search results.

Relevanssi let’s you pick and choose which type of data you would like to make searchable in it’s very comprehensive settings page.

Relevanssi settings : index any WordPress data type.

From this page, you can simply check whichever post-type or taxonomy you want. They will then be indexed.

Improved relevancy

Relevanssi, as it’s name implies, aims to improve relevancy. This means that the results that are returned after a search will be more aligned with the users intentions when they entered the keywords in the search bar. By enhancing the relevancy of search results, Relevanssi ensures that users can quickly find the most relevant content that matches their query, leading to a more satisfying search experience and increased user engagement.

Faster search

Relevanssi makes use of an inverted index rather than a standard index to make the SQL search faster. If this interests you, the Relevanssi speed test results can be found down below.

Different searching algorithms

Relevanssi provides multiple searching algorithms for you to choose from : “whole words matching”, “partial word matching” and “fuzzy word matching”.

Whereas trying to match entire words would return extremely relevant results, it will greatly limit how many will be returned in total. That is why usually partial matching is used since even if you lose a small bit of accuracy, you return a great amount more results.

Search attachment and shortcode content

Relevanssi can also index attachements present in the pages. They can be PDFs, Word documents and many others. Just because your content isn’t HTML, doesn’t mean it can’t be searchable.

But this is not limited to attachements.

Relevanssi offers an option of expanding the shortcodes (executing the PHP code) before indexing the documents. This makes the shortcode content searchable.

WordPress is very popular thanks to it’s customization. Many plugins that offer additional functionalities have been created for this exact purpose. One of the ways they are able to insert custom content in the pages are shortcodes. Shortcodes are an easy way of executing custom code anywhere.

Sorting

Sorting is very useful for finding the content you want. The sorting algorithms determine the order in which the items should appear.

Relevanssi offers two different default sorting algorithms : most relevant and newest.

For the former, the items that more closely match the keyword entered in the search bar will be returned first whereas when using the latter, the newest items would be prioritized.

Adjust weights

Weights are used to determine the importance of a document’s fields or taxonomies.

Relevanssi settings : set weight

For example, if the title’s weight value is higher than the content’s weight value, when a user enters a term in the search bar, the search engine will prioritize matching terms found in the titles of documents over those found in the content body, resulting in more relevant results being returned based on the weighted importance of the title field.

Which is the fastest ?

In this test, we measured the average time to load a search results page.

We tested three WordPress search solutions : default search, Relevanssi plugin and WPSolr plugin.

WPSolr differentiates itself from Relevanssi by ditching SQL-based search and instead makes use of an external search engine. It can integrate many different search engines.  In this case, it connected the WordPress search to an Elasticsearch server.

3 different Woocommerce websites have been tested (200 products, 2000 products and 100000 products). They been tested with up to 100 concurrent users, all executing different search queries. They are all hosted on the same server with the following specs :

  • 8 cores
  • 16 threads
  • 16GB Memory

It is important to know that the results are an average of page load time, not the time spent fetching the results. When having 100 concurrent users, the search may appear very slow but it could be because the setver spend most of it’s time generating the HTML, not executing the search.

For a 200 products website

This test has been done on a WordPress website with 200 products.

When a website contains this little data, the default search can be fast. It is even faster than all alternatives since it is the most simple form of search but that comes with a drawback : while the results are delivered faster to the user they will probably be inaccurate.

 

For a 2000 products website

This 2000 product test proves that when the amount of data increases so does the search times, especially for WordPress default search. Relevanssi does far better in this context. But as you can probably observe, WPSolr’s search time, since it is powered by Elasticsearch, is unaffected.

 

 

For a 100000 products website

With only a single concurrent user, the default search still struggles to keep up. While Relevanssi does far better than the default search, it’s efforts still pale in comparison to WPSolr which once again remains unaffected by the data amount.

 

Which is more scalable ?

We can also test out the scalability of each search, and we did. You can see the results down below.

With 1 concurrent user

Users send search queries one at a time. This showcases pretty much the same results as before. While the SQL-based solutions (default search and Relevanssi) performance is drastically reduced as amount of data increases, WPSolr doesn’ suffer from this since it is powered by a search engine optimized for information retrieval tasks.

 

With 10 concurrent users

When your website has 10 concurrent users, the performance can tank and in this case it did for default search and Relevanssi that take up to 5 seconds to load the search page. Relevanssi does a little better but cannot compete with WPSolr powered by Elasticsearch which doesn’t go above 2.5 seconds and could definitely do far better (way less than 1 second) if the WordPress server received an upgrade.

 

With 100 concurrent users

When your website has 100 concurrent users, the WordPress server can greatly struggle if it is not sufficiently powerful. This is a great amount of traffic and using a search engine to power your search can have an added benefit in this case : it can alleviate the pressure on the WordPress server by taking care of search tasks.

 

 

Conclusion

 

Relevanssi offers a robust alternative to the default WordPress search, enhancing search functionalities and efficiency. By utilizing inverted indexes and providing various features such as improved relevancy, faster search, attachment and shortcode content indexing, sorting options, adjustable weights, and different searching algorithms, Relevanssi significantly improves the search experience for WordPress users. Moreover, performance tests indicate that Relevanssi outperforms the default WordPress search and other search plugins, particularly in handling larger datasets and concurrent user loads, making it a more scalable solution for WordPress websites.

 

However if you truly want a faster and more relevant search you should make use of search engines. WPSolr, a complete search and recommendations plugin, can integrate many (Apache Solr, Elasticsearch, Opensearch, Weaviate, Algolia, Google Retail, Recombee, etc…) into your WordPress and Woocommerce website.

Trending posts