typesense / typesense-instantsearch-adapter

A JS adapter library to build rich search interfaces with Typesense and InstantSearch.js
MIT License
361 stars 62 forks source link

allowing hidden fields with highlighted snippets to show up in hit highlight results #163

Closed ghost closed 1 year ago

ghost commented 1 year ago

Change Summary

I've added a code snippet showing one way to add highlight results to the search hits, when the field that is being highlighted is excluded from the document.

This is something we need, and I've added something to the test data to simulate for it. The response adapter tests work, but couldn't get the entire test suit to run (probably windows related).

I hope you guys can add something similar to the main repo, but I can use this for now.

PR Checklist

ghost commented 1 year ago

Even though it seems to work in the tests, it still doesn't show up in the _highlightResults or _snippetResults. I will use _rawTypesenseHit to create the highlight instead.