Relevanssi Premium 1.7.7 fixes a major bug and adds a couple of neat new features. It is a recommended update and a mandatory update, if you use the “hide this post from index” checkbox feature.
- Fixed a major bug that can make indexing fail when the user has manually chosen to hide posts from the index.
- Removed default values from text columns in the database.
- Relevanssi will now index pending and future posts. These posts are only shown in the admin search.
- Using multiple taxonomies in search will now use OR logic between term within the same taxonomy and AND logic between different taxonomies. Thanks to Jonathan Liuti.
- Added a shortcode ‘noindex’ that can be used to prevent parts of posts being indexed. In order to use the shortcode, you must enable expanding shortcodes in indexing.
The noindex shortcode does nothing outside indexing. When a post with the shortcode is indexed, all content inside the shortcode disappears before the post is indexed. In order for the feature work, you need to enable the shortcode expansion.
The logic when using multiple taxonomies is now clearer. There’s OR logic between terms in the same taxonomy and AND logic between different taxonomies. Sounds complicated? Here’s an example from Jonathan Liuti, who refined the logic:
http://www.example.com/?s=term&taxonomy=country|country|topic|topic&term=Finland|Belgium|crisis|war
This search would return all posts that fulfill all these conditions
- include the word “term”
- have taxonomy country set to Finland OR Belgium OR both
- have taxonomy topic set to crisis OR war OR both
Hopefully this is the logic most people expect from the search; at least to me it makes lots of sense.