Continue reading How to include specific posts

How to include specific posts

Hello, I’m using WooCommerce and Relevanssi and they work great. My Site Search only searches Products, however I want to let certain posts appear in the search results. Is there a way to allow certain posts to be in the results? Yes. There are many ways to do this, and the best way depends on…

Read more How to include specific posts 2 Comments on How to include specific posts
Continue reading Adjusting search throttle

Adjusting search throttle

If Relevanssi Premium causes out-of-memory problems, make sure you have the “Throttle searches” option checked. However, if that doesn’t work and you’re still getting out of memory issues, you can try making the throttle tighter. The limit can be adjusted by adding this line to your site: If necessary, you can adjust the value (250)…

Read more Adjusting search throttle 7 Comments on Adjusting search throttle
Continue reading Using Relevanssi without a search term

Using Relevanssi without a search term

Deprecated: Relevanssi has long supported searching without a search term. These instructions are not necessary. Version 1.7.3 introduces the possibility to use Relevanssi without a search term. This is useful when you have extra query arguments that can be used to narrow the search, but which would be useful without a search term present. This…

Read more Using Relevanssi without a search term 42 Comments on Using Relevanssi without a search term
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