You need to sign in to do that
Don't have an account?
TheRotnelson
How to use SOSL OR Operater
Hi,
Can anyone point out what I am doing wrong. According to how I understand the SOSL documentation (http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_find.htm)I should be able to use the OR operater in SOSL executing from Apex like this:
However I get the exception: System.QueryException: unexpected token: OR
Can anyone point out what I am doing wrong. According to how I understand the SOSL documentation (http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_sosl_find.htm)I should be able to use the OR operater in SOSL executing from Apex like this:
List<List<SObject>> searchList = search.query('FIND \'*boks*\' OR \'*can*\' OR \'*box*\' IN ALL FIELDS RETURNING Account (Id, Name)');
However I get the exception: System.QueryException: unexpected token: OR
List<List<SObject>> searchList = search.query('FIND \'*boks* OR *can* OR *box*\' IN ALL FIELDS RETURNING Account (Id, Name)');