About this question
I want to search in multiple fields using SOSL. I know that it allows to search in all fields using below syntax-
FIND {"Smith"} IN ALL FIELDS RETURNING contact (name), lead (name)
And also works perfectly fine with single field if I supply any field's name instead of ALL like below-
FIND {"Smith"} IN Name FIELDS RETURNING contact (name), lead (name)
What I want to try is something like below-
FIND {"Smith"} IN (NAME, COMPANY) FIELDS RETURNING contact (name), lead (name)I have tried various things here for IN (NAME, COMPANY) like below-
IN NAME, COMPANY
IN {NAME, COMPANY}
IN NAME; COMPANY
Can someone please suggest if there is a way of doing it in SOSL.