I have entry titles that contain dashes (i.e. ABC-123). When I search for 'ABC', 'ABC-123', 'ABC 123', '123' etc the entry is shown in the results (I have fuzzy search enabled). However, when I search for 'ABC123' or anything with the dash omitted from the query the entry does not appear in the results. The same goes for misspellings (i.e. 'ABB-123').
Is there a way for search to return a result that is only a partial match to the query to take into account slight differences between the query and a page title?
Please note that I have the following fuzzy search config settings:
'defaultSearchTermOptions' => array(
'subLeft' => true,
'subRight' => true,
),
And I have the following search query template code:
{% set query = craft.request.getParam('q')|replace('/(( )+|(\\n)+)/', ' ')|split(' ')|join(' OR ') %}