Integrate search facets with the Relevanssi search plugin. Relevanssi greatly improves the quality and relevancy of search results by maintaining its own search index in the database.

Setup

When the Relevanssi integration add-on is activated, each search facet will have a new “Relevanssi” choice within its Search engine setting.

Make sure to set your Search facets to using this new “Relevanssi” engine, otherwise they’ll likely return no results (due to Relevanssi short-circuiting core search).

Turning off results snippets

Some users have reported issues with Relevanssi’s custom search results snippets feature.

If your results don’t show, try turning off that feature, as demonstrated below:

Relevanssi limits

Be aware that using Relevanssi may require large amounts (hundreds of MBs) of database space (for a reasonable estimate, multiply the size of your wp_posts database table by three). If your hosting setup has a limited amount of space for database tables, using Relevanssi may cause problems. The following information is from the Relevanssi site:

“The upper limit of how big a site Relevanssi can support depends on your hardware. On shared hosting accounts with limited resources, tens of thousands of posts can be too much. If your hardware is solid, especially your database, there’s probably no upper boundary. The biggest site we’ve heard run Relevanssi without problems had two million posts, using a dedicated database server with SSD drives.

Relevanssi Light is a version of Relevanssi that has fewer features but runs much faster even on weaker hosting. That’s also a good alternative if performance is critical.”

Changelog

0.7.3

  • New added `facetwp_relevanssi_do_query` hook
  • Improved respect Relevanssi's "Throttle searches" setting for limiting results
  • Fixed use `post_types` query argument instead of `post_type` (for better Relevanssi compatibility)

0.7.2

  • Fixed WP's get_search_query() wasn't rendering correctly

0.7.1

  • Improved additional refactoring to support custom sorting (e.g. the FacetWP sort box)
  • Improved search facets now scan only posts within the current listing (performance tweak)

0.7

  • New complete rewrite for better performance and compatibility
  • New support for Relevanssi Free 4.10.2+ and Relevanssi Premium 2.12.2+
  • New highlighting and "Custom search results snippets" work now

0.6.2

  • Fixed support "order" and "orderby" URL variables

0.6.1

  • Fixed check against $query->get( 's' ) instead of $query->is_search (Event Calendar fix)

0.6

  • Important this add-on now requires FacetWP 3.6 and above!
  • Improved refactored code to support FacetWP 3.6+ query detection changes

See also