Continue reading Integrating Koko Analytics stats

Integrating Koko Analytics stats

It’s possible to integrate all kinds of external data to Relevanssi weights. Koko Analytics is a great analytics plugin. It collects stats about your visitors and stores them in the local database, which means those stats are available for Relevanssi. For some sites, this makes a lot of sense. For example, I have Kirjavinkit, a…

Read more Integrating Koko Analytics stats 0 Comment on Integrating Koko Analytics stats
Continue reading Premium 2.6 / Free 4.5

Premium 2.6 / Free 4.5

The new versions include a couple of new filter hooks that are not of big interest to most users but may be helpful for specific needs. The biggest change in this version is how the stopwords page works: now it is possible to remove all stopwords without having the stopword list automatically repopulate from the…

Read more Premium 2.6 / Free 4.5 5 Comments on Premium 2.6 / Free 4.5
Continue reading Debugging Relevanssi searching issues

Debugging Relevanssi searching issues

Relevanssi has plenty of useful filter hooks you can use to debug problems. Here are some examples of how you can use the Relevanssi filter hooks to debug issues. Add the functions one at a time to your site and run a search to see results. First, try the Relevanssi admin search. Before checking the…

Read more Debugging Relevanssi searching issues 7 Comments on Debugging Relevanssi searching issues
Continue reading Adding extra boost for exact title matches

Adding extra boost for exact title matches

Every now and then, somebody wants to see exact title matches higher in the results. Usually, the best way to do this is to increase the title weight, maybe switch the default operator to AND and let the Relevanssi algorithm lift the best results. If that is not enough, you can use this code to…

Read more Adding extra boost for exact title matches 13 Comments on Adding extra boost for exact title matches
Continue reading Free 2.9.13, Premium 1.7.6

Free 2.9.13, Premium 1.7.6

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…

Read more Free 2.9.13, Premium 1.7.6 0 Comment on Free 2.9.13, Premium 1.7.6
Continue reading Custom weighing with relevanssi_match and relevanssi_results

Custom weighing with relevanssi_match and relevanssi_results

The relevanssi_match hook lets you modify the matches found for queries. It passes a match object, which has the post id ($match->doc), number of hits found in different parts of the post and the weight assigned to the post ($match->weight). Here’s how Relevanssi calculates the weight: Where $idf is the inverse document frequency, aka the…

Read more Custom weighing with relevanssi_match and relevanssi_results 64 Comments on Custom weighing with relevanssi_match and relevanssi_results