for example, I was trying different combinations o...
# community-help
t
for example, I was trying different combinations of these query params
Copy code
GET {baseUrl}/collections/essays/documents/search?query_by=titles&q=cheese&exclude_fields=titles&highlight_fields=titles&highlight_full_fields=titles
but what I'd get back, in truncated form, looks like this
Copy code
{
  // [...snip...]
  "hits": [
    {
      "document": {
        // not the `titles`, which is good
      },
      // this one is good, it only has this
      "highlights": [
        {
          "field": "titles",
          "indices": [ 91 ],
          "matched_tokens": [
            [ "cheese" ]
          ],
          "snippets": [
            "the <mark>cheese</mark> in the rat trap"
          ]
        }
      ],
      // this is the one I want to get rid of
      "highlight": {
        "titles": [
          // or at least not include 
          {
            "matched_tokens": [],
            "snippet": "things unrelated to dairy"
          },
          // there are many here without matched tokens
        ]
      }
    }
  ]
}