Continue reading Premium 2.18 / Free 4.16

Premium 2.18 / Free 4.16

Version 2.18 adds the first draft of Oxygen 4 support. As a major fix to indexing, Relevanssi now removes all accents from letters by default. Version 2.18.0 / 4.16.0 New feature: Oxygen compatibility has been upgraded to support JSON data from Oxygen 4. This is still in the early stages, so feedback from Oxygen users…

Read more Premium 2.18 / Free 4.16 0 Comment on Premium 2.18 / Free 4.16
Continue reading Premium 2.17 / Free 4.15

Premium 2.17 / Free 4.15

…custom field, taxonomy and MySQL column matches. New feature: New filter hook relevanssi_author_query_filter filters the post author MySQL query. New feature: New filter hook relevanssi_by_date_query_filter filters the by_date MySQL query. New feature: New filter hook relevanssi_date_query_filter filters the date query MySQL query. New feature: New filter hook relevanssi_parent_query_filter filters the……post parent MySQL query. New feature: New filter hook relevanssi_post_query_filter filters the post__in and post__not_in MySQL query. New feature: New filter hook relevanssi_post_status_query_filter filters the post_status MySQL query. New feature: New filter hook relevanssi_post_type_query_filter filters the post_type MySQL query. Premium. New feature: Relevanssi will now show available Premium updates even……If you have a valid license, you can now leave support requests from within the Relevanssi settings pages. New feature: New filter hook relevanssi_didyoumean_token lets you filter Did you mean words before correction. You can use this filter hook to exclude words from being corrected. Premium. Minor fix: In some…

Read more Premium 2.17 / Free 4.15 0 Comment on Premium 2.17 / Free 4.15
Continue reading MySQL server kills Relevanssi indexing

MySQL server kills Relevanssi indexing

A Relevanssi user reported a mystical database problem. After about two minutes of indexing, the server shuts down the indexing. This leaves MySQL queries hanging on the server, causing the site to crash. The only way to get the site back live was to reboot the whole MySQL server. Eventually,……to reboot the whole MySQL server. Eventually, they were able to figure out the problem. It was caused by a server misconfiguration. The innodb_buffer_pool_size was restricted to an absurdly low number and both query_cache and OPcode cache were missing. Once these problems were fixed, Relevanssi indexing started working without problems….

Read more MySQL server kills Relevanssi indexing 0 Comment on MySQL server kills Relevanssi indexing
Continue reading Adding custom functions to a site

Adding custom functions to a site

The Relevanssi knowledge base is full of code snippets and custom functions that you can use to enhance your site and to change how Relevanssi works. But where to place those snippets and functions? There are many different methods of adding custom functions to your site, and I will go through them in this article.…

Read more Adding custom functions to a site 4 Comments on Adding custom functions to a site
Continue reading Increasing weight for HTML tags

Increasing weight for HTML tags

Relevanssi ignores HTML tags when indexing posts. If you want to give more weight to words that appear in specific HTML tags (like headings), here is one way to do that. You can add this filter function on your site to the theme functions.php or in a code snippet: add_filter(……’relevanssi_post_content’, ‘rlv_html_tag_boost’ ); function rlv_html_tag_boost( $content ) { $weightings = array( ‘h1’ => 5, ‘h2’ => 4, ‘h3’ => 2, ‘strong’ => 1, ); foreach ( $weightings as $tag => $weight ) { if ( preg_match_all( “#<$tag.*?>(.*?)</$tag>#”, $content, $elements ) ) { foreach ( $elements[1] as $el_content ) { while……( < $weight– ) { $content .= ” $el_content”; } } } } return $content; } This code goes through the post content during the indexing with the relevanssi_post_content filter hook. When it finds content that appears inside the HTML tags specified in the $weightings array, it will add the…

Read more Increasing weight for HTML tags 0 Comment on Increasing weight for HTML tags
Continue reading Indexing image alt texts

Indexing image alt texts

Relevanssi by default ignores image alt texts (and other tag attributes). That’s often the right thing to do because alt texts aren’t visible to users. Finding a post with a search term that only appears in an alt text may confuse a user. If your alt texts are well crafted, they may help search. It’s…

Read more Indexing image alt texts 0 Comment on Indexing image alt texts
Continue reading Polylang attachment searching

Polylang attachment searching

…you can either enable “Media translate” so that your media files have a language, or you can use this code in your theme functions.php to always include attachments in the results: add_filter( ‘relevanssi_where’, function( $query ) { global $wpdb; $query = str_replace( ‘AND relevanssi.doc’, ‘AND ( relevanssi.doc’, $query ); $query…If Polylang is in use and you haven’t enabled “Media translation“, your attachment files won’t have a language. That’s fine, except when Relevanssi searches fail to find your attachment because they’re looking for posts in a specific language. Suppose you want to include attachments in Polylang searches. In that case,…

Read more Polylang attachment searching 0 Comment on Polylang attachment searching
Continue reading Premium 2.16 / Free 4.14

Premium 2.16 / Free 4.14

…Premium. Proximity sorting lets you sort posts by geographical distance. See the knowledge base for details on how this works. New filter hook relevanssi_render_blocks controls whether Relevanssi renders blocks in a post or not. If you are having problems updating long posts with lots of blocks, having this filter hook……versions are no longer officially supported and are not safe to use in the long run.) 2.16.7 / 4.14.7 Premium. Minor fix: The relevanssi_index_taxonomies_args filter hook should’ve been removed from use long time ago, but it was still in use in some cases, and thus relevanssi_hide_empty_terms didn’t always work, depending……is now fixed. Premium. Minor fix: Pinning didn’t work with numeric keywords. 2.16.5 / 4.14.6 Security fix: Extra security checks for AJAX actions. 2.16.4 / 4.14.5 Security fix: Any registered user could empty the Relevanssi index by triggering the index truncate AJAX action. That is no longer possible. New feature:…

Read more Premium 2.16 / Free 4.14 0 Comment on Premium 2.16 / Free 4.14