Search Algorithm Options

Since ElasticPress 4.0, there are three options for search algorithms. The default is the 4.0 algorithm, which searches for all search terms in one field first, and then prioritizes them over search terms matched in different fields.

The 3.5 algorithm searches for the existence of all words in the search first, then returns results based on how closely those words appear. Version 3.4 uses a fuzzy match approach which includes results that have misspellings, and also includes matches on only some of the words in the search (vs all words appearing somewhere in the result, even if not directly next to one another).

To use the 3.4 algorithm, for example, simply add this filter:

add_filter( 'ep_search_algorithm_version', function() { return '3.4'; } );

Alternatively, you can use the Search Algorithm Version feature of ElasticPress Labs:

ElasticPress Labs - Screenshot of the Search Algorithm Version feature