Is there any way to convert SOSL Find clause into SOQL where clause ? For example following SOSL and SOQL both have same filter criteria.
SOSL: FIND {'ABC' and 'XYZ'} IN ALL FIELDS Returning ACCOUNT(fieldList)
SOQL: Select fields from Account where (Name ='ABC' and Name = 'XYZ')
I have a situation where I come to know at run time, which field to search, hence some time SOSL and some time SOQL will fit into my requirement. But problem is that While providing input, user can input searchText which can have 'operators/phrases' from UI which will directly fit into FIND clause of SOSL, whereas we need to convert that searchText into Where clause to fire SOQL properly.
Hence looking for a way to convert FIND clause into SOQL where clause.
Thanks in Advance.