- Language
- English
- Compatible XF 2.x versions
- 2.3
- Additional requirements
- PHP 7.2 or newer
MySQL 5.7 and newer
All of the add-ons listed here require XenForo 2.3.
Enhanced Search requires at least Elasticsearch 7.0
XenForo Enhanced Search is an add-on that replaces the built-in XenForo search system and is built to take advantage of Elasticsearch to provide a higher performing and more flexible search system for XenForo.
In the beginning, XenForo Enhanced Search (XFES) was intended to be a simple drop-in replacement for MySQL full text search, primarily aimed at large forums whose operation would potentially suffer when attempting to search very large database tables.
As a drop-in, XFES only made use of the enhanced search index and speed for the formal search system, but with version 2.2 we are starting to leverage more of the power afforded by the Elasticsearch back-end.
Similar threads
A useful tool for surfacing content on your forum is a list of Similar or related threads, which can be displayed along with a primary thread. Visitors who have landed on that page from a search engine will often look for related material to continue their reading, and Similar threads offer a great way to provide that in an automated fashion.
One limitation of the usefulness of Similar threads is a determination of just how similar or related the results actually are. This is where XFES comes into its own, as the Elasticsearch back-end provides a specific ability to search for more like this using the current thread as a search parameter. Given a decent amount of content from which to pluck similar results, this provides an excellent list of threads in which the viewer of the current thread may be interested.
Similar threads widget
We display our similar threads results in a widget, and by default we place it below the quick reply area on thread view pages, but as it is a widget you can choose to place it wherever you like on the page.
What's new in XenForo Enhanced Search 2.3?
Minimum requirements
For reasons that will become clearer below, we have made a somewhat last-minute decision to increase the minimum version requirement for Elasticsearch even further. We had previously raised the minimum requirement from Elasticsearch 2.0 (released 2015) to Elasticsearch 7.0 (released April 2019).We have now raised the minimum version to Elasticsearch 7.2 (released June 2019). We don't envisage that this would impact many people as we expect that most users who needed to upgrade from a much older version probably upgraded to a much more recent version. However, if you are running Elasticsearch below 7.2.0 please take extra care when upgrading to XenForo 2.3.0 Beta 5 to ensure you're on a suitable Elasticsearch version.
Official OpenSearch support
Since the Elasticsearch license changes were announced in 2021, and concerns about the impact that might have on the licensing of Elasticsearch now and into the future, Amazon Web Services have launched OpenSearch. This fork of Elasticsearch is an open source distribution with promises of providing ongoing development and support under a more permissive license. Enhanced Search didn't previously officially support OpenSearch but we're pleased to announce that starting with 2.3 this changes.Search suggestions
With the slight further increase in minimum requirements brings with it some additional functionality to facilitate "Search suggestions" AKA "Auto complete" for search results! Simply type your query as normal and, if enabled, relevant results (with respect to the title of the content) based on your search query will be displayed.This also works with any content type constraints you might have set as seen with this example inside the "XenForo suggestions" forum.
And of course this works in the advanced search form too!
This is all made possible behind the scenes thanks to Elasticsearch's search_as_you_type mappings with shingle and edge n-gram filters. The eventual query we run also supports fuzzy matching to provide some tolerance for typos.
The concept of auto completion for search results has also been implemented into the core of XenForo itself. This enables other developers to implement search suggestions with third party search add-ons using other search platforms by simply implementing an
autoComplete method in their source handler and indicating their search source supports it.And for add-on developers in general wishing to add auto complete support to their own content types, that's really easy by simply implementing our
AutoCompletableInterface in your search data handlers (we also have AutoCompletableTrait which is optional but recommended for most cases).