Closed dianos closed 2 years ago
@dianos If you use highlight_fields
(which means results will be highlighted with snippetting), you'd need to use the Snippet
widget to access the results.
yes replacing helpers.highlight
with helpers.snippet
works, thx :)
Snippet causes text in the field to be cut short. Is there a way to highlight full fields that are not in queryBy?
Snippet causes text in the field to be cut short.
Yes, this is by design. Snippet is to show a small portion of the text around the match text. To get the full field, you need to use highlight full fields and helpers.highlight
Is there a way to highlight full fields that are not in queryBy?
You can set additionalSearchParameters.highlightFullFields
to include all the fields you want to be highlighted.
Description
highlight_fields causing them to be shown as 'undefined'
Steps to reproduce
if the field is not in queryBy: "description,concat" it's shown as undefined when there is a highlight. in this case: highlight_fields:"name,description,concat",
Typsense Version: 0.22.rc6 "typesense-js": "^0.14.0", "typesense-instantsearch-adapter": "^2.0.1"
OS: linux ubuntu
note: earlier versions of the typesense js libraries were showing all these fields as undefined even if there was no highlight.