You need to sign in to do that
Don't have an account?
Bhushan2710
Problem with SOSL Query
Hi,
I am doing a SOSL query to find the account records. My query is as below:
string searchText;
string querySosl = 'FIND \'' +searchText+'*\' IN ALL FIELDS RETURNING Account(Id,Name,BillingPostalCode,ShippingPostalcode,Website,AccountNumber)';
List<List<sObject>> searchList = search.query(querySosl);
System.debug('****searchList****** '+searchList);
The above query does not returns me correct record as expected.
So for example I have a Account Named : 512 Tech Limited
So when I search for word 'Limited' nothing is returned to me. But if I search for '512' the query returns the correct account.
So is this a limitation of the SOSL query ?? or something else that is causing query to behave in this manner.
I am doing a SOSL query to find the account records. My query is as below:
string searchText;
string querySosl = 'FIND \'' +searchText+'*\' IN ALL FIELDS RETURNING Account(Id,Name,BillingPostalCode,ShippingPostalcode,Website,AccountNumber)';
List<List<sObject>> searchList = search.query(querySosl);
System.debug('****searchList****** '+searchList);
The above query does not returns me correct record as expected.
So for example I have a Account Named : 512 Tech Limited
So when I search for word 'Limited' nothing is returned to me. But if I search for '512' the query returns the correct account.
So is this a limitation of the SOSL query ?? or something else that is causing query to behave in this manner.
string querySosl = 'FIND \'*' +searchText+'*\' IN ALL FIELDS RETURNING