Highlighted search terms in the Content Delivery search query result set

By default, the JSON-formatted search query results do not include highlighting of where search terms were found in the returned content field or other fields (like metadata fields). However, if you call certain methods in your API calls or use certain query parameters in your query parameter search, the search terms are highlighted.

For example, imagine that you searched for jelly donut (interpreted as an OR of two search queries) in any field. Without any highlighting configured, your JSON result might look like this:
{
  "content": "When buying baked goods, always make sure there is enough jelly in each donut.",
  "id": "12",
  "name": "udp-content-default",
  "itemType": "page",
  "fields": {
    "keywords": "jelly chocolate plain donut confectionery"
  },
  "locale": "en",
  "publicationId": "1"
}
If you enable basic highlighting (using the enableHighlighting() method or the highlighting query parameter), a highlighting section gets added, with the content field repeated, with <em> tags enclosing the search terms:
{
  "content": "When buying baked goods, always make sure there is enough jelly in each donut.",
  "id": "12",
  "name": "udp-content-default",
  "itemType": "page",
  "fields": {
    "keywords": "jelly chocolate plain donut confectionery"
  },
  "locale": "en",
  "highlighted": {
    "content.english": [
      "When buying baked goods, always make sure there is enough <em>jelly</em> in each <em>donut</em>."
    ]
  },
  "publicationId": "1"
}
Alternatively, if you enable highlighting in all fields (using the enableHighlightInAll() method or the highlightInAll query parameter), a highlighting section also gets added, but now with all matching fields repeated, with <em> tags enclosing the search terms:
{
  "content": "When buying baked goods, always make sure there is enough jelly in each donut.",
  "id": "12",
  "name": "udp-content-default",
  "itemType": "page",
  "fields": {
    "keywords": "jelly chocolate plain donut pastry"
  },
  "locale": "en",
  "highlighted": {
    "content.english": [
      "When buying baked goods, always make sure there is enough <em>jelly</em> in each <em>donut</em>."
    ],
    "dynamic.keywords": [
      "<em>jelly</em> chocolate plain <em>donut</em> pastry"
    ]
  },
  "publicationId": "1"
}