Can I combine two SearchGroup in one SOSL query? I want to search both in Name Fields and in Phone fields. Something like

FIND {78*} IN (NAME , PHONE) FIELDS RETURNING Contact(id,name,phone)

You can try like this:

RETURNING Contact(id,name,phone 

Refer WHERE condition

Updated based on comments

| improve this answer | |
  • I have custom objects and I don't know the names of the fields. That's why I want to refer to the fields as group – Polina F. Dec 22 '16 at 14:05
  • In this case, just remove WHERE condition and search All fields – Santanu Boral Dec 22 '16 at 14:09
  • @SantanuBoral your answer and comment has nothing to do with the question. – Andy Ray Apr 25 '19 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.