Relevanssi Premium 1.3 is now available, with some very interesting features.
- Bug fix: when choosing mark highlighting, the option screen showed wrong option.
- Category restrictions now include subcategories as well to mirror WordPress default behaviour.
- Internal links can be now indexed for the source, target or both source and target.
- It’s now possible to limit searches by custom fields.
- It’s now possible to use more than one taxonomy at the same time.
Link anchor indexing
The internal link indexing is something a bit complicated, so here’s little more information about it. John Blackbourn came up with the idea and also wrote the code for it, so you can all thank him for this gem of a feature.
The basic idea is simple: link anchor texts on internal links are indexed for the document the link points to. So, if post A links to post B with a phrase Q, searching for that phrase will not find post A, but post B. This whole idea of link anchors describing the documents they link to is of course familiar from Google.
This feature has couple of options. First adjust the weight of the links. Default is a fairly low 0.25, but John and I have no idea what would be a good value. If you experiment with this, please let me know what works for you. The other option determines how the links are processed. The default value ignores the links and indexes the anchor text as usual. If the link indexing is active, you can choose to index the anchor texts for target document only or for both documents. The first option is what I described above, the second option would find both posts A and B.
So, give it a go and let me know how it works.
Custom fields and taxonomies
I’ll be writing custom field and taxonomy search entries for the knowledge base soon, but here’s the quick overview for those options as well.
You can now set search parameter customfield_key to restrict searches to posts that have a certain custom field present and a combination of customfield_key and customfield_value to restrict searches to combinations of key and value.
What comes to taxonomies, by default WordPress (and thus Relevanssi) allows you to restrict search with one category, one tag and one custom taxonomy. This is a hard limit. Relevanssi will now let you to bypass this. If you have taxonomies, say, director and actor, you might try ?s=term&director=scorsese&actor=de+niro and that would fail. Now you can do ?s=term&taxonomy=director|actor&term=scorsese|de+niro. Clumsy, yes, but the only way to bypass this rather hard limit in WordPress. You can load the parameters with as many taxonomies you want, just make sure the taxonomies and the terms are in the same order in both parameters (and that there are as many taxonomies and terms present).