Posted on

Premium 1.5

A new version of Premium is here, with cool new features.

  • Taxonomy pages (tags, categories, custom taxonomies) can now be indexed and searched.
  • Short search terms don’t crash the search anymore.
  • There are fixes to the user search as well, including a new option to index additional fields.
  • Relevanssi now uses search result caching system that greatly reduces the number of database calls made.
  • Punctuation removal function is now triggered with a filter call and can thus be replaced.

 

The first one is the hot one, of course. Enable the option in the settings, re-index and all your taxonomy pages will be available to searchers. Categories, tags, custom taxonomies — you name it, your users can search it. Better go write some content on all those description fields, then…

The user search got some fixes at the same time.

There are some problems with the taxonomy and user pages appearing in the search results. The biggest is that get_permalink() function does not work with them. It figures out the post doesn’t exist and returns false. However, the_permalink(), which is essentially get_permalink() with a filter and an echo on top, works, because of that filter. If you need to echo the link, you can try relevanssi_get_permalink(), which should work (for user and taxonomy pages, but also for regular posts and pages).

I was alerted to the fact that Relevanssi makes lots of database calls when searching. Several hundreds of them, actually, if you search for a common word. I’ve fixed this now with a caching mechanism that’ll uses a bit more memory, but doesn’t hit the database nearly as many times.

Somebody had a problem that required changing the way punctuation is removed. They ended up modifying the relevanssi_remove_punct() function. I’ve made that function filter-triggered, so now you can, if necessary, remove the default function from the relevanssi_remove_punctuation hook and replace it with your own. Relevanssi, by the way, has more hooks, and some of them are not documented anywhere. If you’re doing some custom hacking, there just might be a hook you can use.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.