0

I am a newbie working with Salesforce.com API. And I am now confused WITH HIGHLIGHT vs WITH SNIPPET in Salesforce.com API.

According to the documentation, they have the same behavior that highlights the terms matching the search query in search results.

WITH HIGHLIGHT

https://developer.salesforce.com/docs/atlas.en-us.232.0.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_with_highlight.htm

WITH SNIPPET

https://developer.salesforce.com/docs/atlas.en-us.232.0.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_with_snippet.htm

Could you explain to me the difference between WITH HIGHLIGHT and WITH SNIPPET?

NoName
  • 877
  • 12
  • 28

1 Answers1

0

Even though they may have the same/similar behavior - each clause can only be applied to the respective objects listed in the documentation:

WITH SNIPPET is an optional clause that can be added to a SOSL query for article, case, feed, and idea searches

vs.

WITH HIGHLIGHT is an optional clause that can be added to a SOSL query for business account, campaign, contact, custom object, lead, opportunity, quote, and user searches

Kris Goncalves
  • 101
  • 1
  • 1
  • 4