Continue reading Boosting shorter posts with higher keyword density

Boosting shorter posts with higher keyword density

By default, Relevanssi tends to prefer longer posts. The default TF × IDF weights Relevanssi uses simply count the term frequency, ie. how many times a word appears in the post. That prefers longer posts as they usually have the search term appear more often. However, a 500-word post with 15 search term appearances might…

Read more Boosting shorter posts with higher keyword density 0 Comment on Boosting shorter posts with higher keyword density
Continue reading WooCommerce: Return only exact matches for SKU searches

WooCommerce: Return only exact matches for SKU searches

This little filter function works on relevanssi_hits_filter. When a search query is made that matches an SKU (or any other custom field, but SKUs are the most likely scenario here), only results that match the SKU will be returned. For this to work, Relevanssi must be set to index the _sku custom field (because otherwise,…

Read more WooCommerce: Return only exact matches for SKU searches 1 Comment on WooCommerce: Return only exact matches for SKU searches
Continue reading Premium 2.8 / Free 4.7

Premium 2.8 / Free 4.7

These versions add new features, but these are mostly small and of interest to developers. As a big change Relevanssi is now active in Media Library searches in the admin backend (if admin searches are enabled): feedback on this is welcome. Excerpts should be slightly better, especially when content stopwords are involved and post part…

Read more Premium 2.8 / Free 4.7 2 Comments on Premium 2.8 / Free 4.7
Continue reading Using phrases in Related posts searches

Using phrases in Related posts searches

I have a book review site where I’m using Relevanssi Premium and the Related posts to highlight related book reviews. The reviews have multiple taxonomies used for the related posts: tags, book author, series, characters, and places. Messy relations The problem is, with the default settings, the Related posts get a bit messy. This site…

Read more Using phrases in Related posts searches 0 Comment on Using phrases in Related posts searches
Continue reading Relevanssi indexes excluded posts

Relevanssi indexes excluded posts

Sometimes it can happen the search results include posts from a post type that has been excluded from the index. When that happens, here are things you can check. Are you using Relevanssi? It’s possible your search results are not coming from Relevanssi. The quickest way to check is to use the Relevanssi admin search…

Read more Relevanssi indexes excluded posts 3 Comments on Relevanssi indexes excluded posts
Continue reading Indexing product codes with and without spaces

Indexing product codes with and without spaces

A Relevanssi Premium customer had a problem with product codes. The codes are in the format “ABC 100”, a group of letters and digits with a space in between. Users may search for the codes without the space, so the post should be found with “ABC 100” or “ABC100”. The product codes don’t appear in…

Read more Indexing product codes with and without spaces 10 Comments on Indexing product codes with and without spaces
Continue reading Debugging indexing problems

Debugging indexing problems

The easiest way to debug indexing problems is to use the WP CLI tools available in Relevanssi Premium. To see how Relevanssi sees the post 123, just use the following command on the command line: This will print out how Relevanssi sees the post, how it appears in the different steps of the indexing process…

Read more Debugging indexing problems 2 Comments on Debugging indexing problems
Continue reading Pinning and exclusion doesn’t work for custom post types in Gutenberg

Pinning and exclusion doesn’t work for custom post types in Gutenberg

Sometimes when you try to access the pinning or the exclusion settings for a custom post type post in the Relevanssi Gutenberg sidebar, you come across this error message: If you copy the error, the relevant beginning will look like this: Error: An error occurred while running ‘mapSelect’: Cannot read property ‘_relevanssi_pin_keywords’ of undefined The…

Read more Pinning and exclusion doesn’t work for custom post types in Gutenberg 0 Comment on Pinning and exclusion doesn’t work for custom post types in Gutenberg
Continue reading Premium 2.7 / Free 4.6

Premium 2.7 / Free 4.6

The main reason to release this new version is to fix a major problem with WordPress 4.9 compatibility. I strongly recommend moving on to WordPress 5 (and Classic Editor, if necessary), but this version removes the problem. Since there were couple of changes in Relevanssi behaviour included as well, this is a minor update and…

Read more Premium 2.7 / Free 4.6 0 Comment on Premium 2.7 / Free 4.6