function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TheRotnelsonTheRotnelson 

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: 
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
Best Answer chosen by TheRotnelson
David ZhuDavid Zhu
YOU may use:
List<List<SObject>> searchList = search.query('FIND \'*boks* OR *can* OR *box*\' IN ALL FIELDS RETURNING Account (Id, Name)');