Tobias Davis
04/24/2024, 4:07 AMGET {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
{
// [...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
]
}
}
]
}