#community-help

Debugging Document Highlighting Issue in Typesense

TLDR Adrian asked why a document has no highlights. Jason suggested upgrading Typesense to a later version and discussed settings that might affect the highlights.

Powered by Struct AI

1

11
2mo
Solved
Join the chat
Jul 27, 2023 (2 months ago)
Adrian
Photo of md5-27ff63286c7b3dcb91085f39e910c437
Adrian
09:54 PM
I'm getting a document returned with no highlights. I do not expect this document to match the search query based on its values. It was upserted and its previous value correctly matched the search input. Any ideas on how to debug? Should it be possible to have a hit with no highlights (what is it matching to)?
Image 1 for I'm getting a document returned with no highlights. I do not expect this document to match the search query based on its values. It was upserted and its previous value correctly matched the search input. Any ideas on how to debug? Should it be possible to have a hit with no highlights (what is it matching to)?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
10:08 PM
May I know what version of Typesense this is?
Jul 28, 2023 (2 months ago)
Adrian
Photo of md5-27ff63286c7b3dcb91085f39e910c437
Adrian
02:34 AM
0.25.0.rc34
02:40
Adrian
02:40 AM
would you suggest upgrading? I don't think there is a stable release for 0.25 yet unless I missed it
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:30 AM
I’d recommend upgrading to 0.24.0.rc55 0.25.0.rc55… I vaguely remember some issues with highlighting in earlier releases
03:31
Jason
03:31 AM
Also, if this is a wild card query with q=* or if highlight_fields is set to empty, then you’d see empty highlights
Adrian
Photo of md5-27ff63286c7b3dcb91085f39e910c437
Adrian
03:38 AM
ah interesting i didn't know wild card queries were supported. And highlight_fields is not explicitly set so should be defaulting to the query_by, correct?
03:38
Adrian
03:38 AM
> I’d recommend upgrading to 0.24.0.rc55… I vaguely remember some issues with highlighting in earlier releases
Sounds good will upgrade and see if that resolves the issue
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:38 AM
> And highlight_fields is not explicitly set so should be defaulting to the query_by, correct?
Correct
Adrian
Photo of md5-27ff63286c7b3dcb91085f39e910c437
Adrian
03:38 AM
assume you mean 0.25.0.rc.55?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:38 AM
Oh yes, my bad

1