Below is my SOSL query -
FIND {searchString}
IN ALL FIELDS
RETURNING Account(Id,Account_Number__c, RecordType.Name,Name LIMIT 16)
1) When I put searchString = '42430' in sosl query
Query 1:
FIND {42430}
IN ALL FIELDS
RETURNING Account(Id,Account_Number__c, RecordType.Name,Name LIMIT 16)
Result: 1 record retrieved
2) When I put searchString = '42430*' in sosl query
Query 2:
FIND {42430*}
IN ALL FIELDS
RETURNING Account(Id,Account_Number__c, RecordType.Name,Name LIMIT 16)
Result: 6 records retrieved
According to my understanding, Query 1
should return records whose any field value contains '42430' and Query 2
should return records whose any field value Starts with '42430'.
So query 1 should return at least 6 records (query 1 results should be inclusive of query 2 results). Why query 1 is retrieving only 1 record??
On the other hand when I search 42430 in search engine, I get records whose field value is exactly equal to '42430'. How does the salesforce search engine works internally?