Quality search results have long been a problem with WordPress and WooCommerce. Not only are the traditional search techniques inaccurate, they’re slow too!
Super Speedy Search solves this using multiple full-text indexes which improve accuracy and transform speed.
It’s so fast that we’ve made it search as you type. So, users start typing ‘Harry Potter’ and before their very eyes, your shop archive updates with all of your Harry Potter products.
The default plugins, and most premium plugins use the LIKE operator to search your database. This is slow because it prevents the use of any indexes. It’s also inaccurate, because for the LIKE operator to get a successful match it has to match identically what is in your database.
Full-text indexes are different – they provide something called stemming which means a search for ‘childrens clothes’ will match ‘child clothes’, ‘clothes for children’ and other derivatives. Stemming means words in your database are reduced to their language root, their derivative. Because of this, accuracy is increased and your users don’t have to type exactly what’s stored in your descriptions in order to find products.
Full-text indexes also provide a relevance score. If you’ve searched on Amazon before, you know that they’re good at showing you relevant results, but it is often difficult to find relevant results with other WordPress search plugins. Super Speedy Search uses multiple full-text indexes to search across post_title, post_content and the values in wp_postmeta.
You can choose which post types you’d like your widget to search – any combination of post_types are allowed, but given that search results will appear directly on the page you should take care with this – e.g. it may look odd to have a blog result mixed in with products, but I’ve left that up to you.
Upload the plugin files and activate it. Then visit Appearance->Widgets and add the Super Speedy Search widget to your sidebar or top nav bar (depending on your theme and where you want it to appear). Typically, you’ll add it to your shop sidebar.
Choose the search box type – there are currently two types – search everything, which will search your entire shop regardless of current filter settings, and ‘Search with current filters’ which will only search based on your current category and/or current attribute filters.
Choose ‘product’ post type because it doesn’t currently work with any other post types yet (beta version).
Now visit your shop page where you can see your search widget and type into it. You will see a brief ajax spinner to the right of the search box and then the shop archive results will be replaced with your search results.
How does it work?
Rather than having a separate search results page, it replaces your current archive search results as you type. It’s very fast as you can see in the video below which is on my reference WooCommerce affiliate site with 820,000+ products and it’s only a $40 per month Digital Ocean server.
This product is in beta so there are many known issues:
- Only tested against products so far, and in fact I know it won’t work with other items yet because I’ve yet to create the bit of customisation to allow you to choose which part of the page to replace with results
- It currently only searches post_title and post_content – I have plans to add the ability to search post_meta values against whichever keys from post_meta you wish.
- It’s not yet multilingual, but I am adding options to the widget to let you provide the text for the search button and the placeholder
- It doesn’t yet fix your search results page (the page on your site that has ?s=searchstring) but this will be in the final release
- It doesn’t yet handle pagination so infinite scroll and pagination will be broken
- It currently returns 25 products and you cannot yet change this
- There’s room for improvement in the relevancy ordering
- There’s probably a bunch of other stuff you’ll all tell me needs to be done to make this good