Fuzzy vs exact global search results

I am trying to understand some differences I am seeing on certain field types for Global Search. Currently I am seeing this in 8.0.3 but am comparing to different results we were getting in 7.7.

When searching for a name field (name, first_name, last_name) that is prepended or appended with a character like '<' or '>' the special characters seem to be ignored. However when doing the same on email they are not. 

We get this issue because users commonly copy an email address from an email and paste it into search. This was their workflow in 7.7 and they would get the expected email addresses. 

I have searched through various vardefs and field definitions and cannot find what may be causing the difference in the results and if there is a varied or other alteration I can make (full_text_search boost or type). 

A heavy handed workaround was to extend the Global Search API and do a string replace on the search term but I was hoping to avoid that if possible.

Any direction or suggestions would be appreciated.

  • I was able to track down the change that explains the difference in behavior and implement a fix for this.

    The change was in the Elasticsearch Sugar libraries at src/Elasticsearch/Provider/GlobalSearch/Handler/Implement/EmailAddressHandler.php 

    There seems to be a change in the index type from 'uax_url_email' to 'whitespace' within the buildAnalysis method.

    After some testing on a 'URL' field type this behaves as the email address field used to with '<' and '>' characters.

    To regain the original functionality I extended the clients/base/api/GlobalSearchApi.php endpoint and did a simple string replace on the $this->term parameter where we guessed a user is searching for email (included an @ in the string).