Small maintenance updates to both free and Premium, mostly with the same changes.
Here’s what’s new in both:
- Fixed a mistake in the FAQ: correct post date parameter is ‘post_date’, not ‘date’.
- New filter
relevanssi_results
added. This filter will process an array with (post->ID => document weight) pairs. - Private and draft posts were deleted from the index when they were edited. This bug has been fixed. (Thanks to comprock.)
- When continuing indexing, Relevanssi now tells if there’s more to index. (Thanks to mrose17.)
- Improved WPML support.
- The
relevanssi_index_doc()
function has a new parameter that allows you to bypass global$post
and force the function to index the document given as a parameter.
This is only for Free:
- Stripping shortcodes from excerpts didn’t work properly. Should work now.
- Fixed problems with searching attachments. Indexing attachments still has some problems. When you build the index, attachments are indexed properly.
See more about relevanssi_results.
You can now call relevanssi_index_doc()
directly and have it index a document for you.
- The first parameter is either the post ID or the complete post object
- If the second parameter is true, the post is first removed, then added (it’s an update)
- The third parameter should have the return value of relevanssi_get_custom_fields()
- If the fourth parameter is true, Relevanssi will not mind the global $post and indexes whatever the first parameter says (otherwise Relevanssi will index the post specified by the global $post).