Slackbot
08/07/2023, 2:07 PMDima
08/07/2023, 2:28 PMhighlights for each found hit, you can see it in the example responseDima
08/07/2023, 2:29 PMdocument?Michael Thomas
08/07/2023, 2:56 PMJason Bosco
08/07/2023, 3:39 PMhit.highlight.fieldX?.value || hit.document.fieldX in JS for eg to check if a highlight exists for a field, if not fallback to the unhighlighted fieldMichael Thomas
08/08/2023, 7:12 AMJason Bosco
08/08/2023, 4:12 PMhighlights key in the response which has a different structure (we’ll be deprecating it in a future version, but just keeping it around for backward compatibility).
Instead you want to use the new highlight (singular) key (as of v0.24.1) which should be much easier to parse