Continue reading Premium 2.6 / Free 4.5

Premium 2.6 / Free 4.5

The new versions include 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 default…

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. Place the functions one at the time in the theme functions.php file and run a search to see results. First try Relevanssi admin search Before checking…

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 go about with this is to simply increase the title weight, maybe switch the default operator to AND and let the Relevanssi algorithm lift the best results on top. If that is not enough, you…

Read more Adding extra boost for exact title matches 13 Comments on Adding extra boost for exact title matches
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 the weight is calculated: 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