• Hot
  • Top
  • New
2
votes

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

approved

Allow searching of tags, categories and everything else in wp_terms

I’ve had a request to allow Super Speedy Search to search wp_terms and wp_termmeta.

This would be to search Product categories, subcategories, tags and attributes – the plugin would still be searching for ‘posts/products’ (whatever custom post type) but would bring back more items that match these tags, attributes and categories.

Some work is required in order to integrate these properly into the search results. i.e. currently, search results have a ‘relevancy score’ which is v useful to show most relevant items at the top.

What I’m proposing to add is to merge any products which have tags, attributes, categories that fuzzy match the search string – if these are new products, add them in with a score of 0.5, if they already exist, add 0.5 to their current score. This will need to be tweaked until it’s working well.

 

1
votes

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

completed

Add ability to search wp_postmeta and other fields

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.