-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Description
- meili server currently does not only return
_highlightResultkeys for just those specified via theattributesToHighlightsearch parameter - this means data that should not even be attempted to be highlighted is still returned.
- e.g. an array of images under the
imageskey with objects of type{url:string; size: number; h:number; w: number; alt: string} - these non-primitive fields are not returned with a
valuefield which is required for highlighting -- see image
- e.g. an array of images under the
- in lieu of (what I imagine is) a larger change, i suggest there be some defensive checks in the autocomplete highlight parsing for the existence of a valid
valuekey in each of the returned_highlightResults
NB. this is touched on in a related issue: #1337 (comment)
Expected behavior
- not all attributes returned in highlightResult - only those specified via
attributesToHighlight - the autocomplete frontend parsing to not typeerror when the
valuekey doesn't exist for an attribute highlight result.
Current behavior
autocomplete typeerrors
Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
- OS: Mac 15.6
- Browser: Chrome 140
- Meilisearch version: latest
- instant-meilisearch version: latest
- instantsearch.js version: 4.77.0
Metadata
Metadata
Assignees
Labels
No labels