I wrote a SOSL query:
FIND {Joe} IN NAME FIELDS RETURNING Contact
It returned me couple of records in which one of them had Mark John
in the name field of the Contact
. Reading the SOSL documentation mentioned below it seems like Find{Joe}
should be an exact match and not a fuzzy match.
FIND {SearchQuery} Use the required FIND clause of a SOSL query to specify the word or phrase to search for. A search query includes the literal word or phrase and can also include wildcards and logical operators (AND, OR, and AND NOT). A search query includes: The literal text (single word or a phrase) to search for Optionally, Wildcards Optionally, logical Operators, including grouping parentheses
I am trying to understand why does Find{Joe}
returns 'Mark John'
. Isn't Find{Joe}
an exact match criteria? It does not even have wildcard to return John
AssistantName, FirstNameLocal, LastNameLocal
When you put 'Joe' in global search doe it return 'Mark John'? – Eric Jun 10 '17 at 4:04FIND {Joe} IN ALL FIELDS
it returned only contacts with Name such as John Bond,John Smith,Mark John,Joe Smith, Jack Rogers – SfdcBat Jun 10 '17 at 4:35AssistantName
specified for Mark? That too gets searched as a name field according to the documentation. – Adrian Larson♦ Jun 10 '17 at 13:42