I can't understand the purpose of putting asterisks before and after the SOSL query below. Is it to cover searches for the wildcards just Jsmith when the user searches smith or smithj when the user searches smith?
searchquery = 'FIND\'' + '*' + conLN + '*' + '\' IN ALL FIELDS RETURNING Contact(Name, Id, FirstName, LastName ORDER BY Createddate DESC)';
Where conLN is a string last name passed in from an input. The string is escaped to prevent single quote errors.
The documentation tends to indicated wildcards: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm
The reason I ask is because I believe some part of this is interfering with quote searches: Ex: O'Connor.