• Hot
  • Top
  • New

You have ... votes left in this category for this week!


Add ability to search wp_postmeta and other fields

Dave Hilditch shared this feature

November 7, 2017

Currently Super Speedy Search can search any custom post type, but it only searches the wp_posts title and description.

I’ve had a few requests from clients to add the ability to search wp_postmeta too. Rather than searching ALL of wp_postmeta, probably there will be a list of meta_keys provided to search against?

Because this is a search of wp_postmeta, it will require a SECOND search to occur (full text indexes cannot span multiple tables). This will mean the search speed will be slightly slower.

There are two key issues to be wary of:

  1. wp_postmeta typically has 20 – 100 times more rows than wp_posts
  2. free-text indexes do not work well against short text – i.e. if wp_postmeta contains a LARGE chunk of text then this search will behave well, but if wp_postmeta is 20 characters or so then it would not work well and a different solution would be required.


Leave a Reply

Your email address will not be published. Required fields are marked *

Last chance to grab a lifetime unlimited bundle! Ends Cyber Monday

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.