Ashraful Islam Mahim
08/21/2023, 10:06 AMJason Bosco
08/21/2023, 5:13 PMMy current implementation is to query the primary index for page title attribute , and return the records.This would indeed be the solution.
Most the time it has a full sentence / large number of wordsYou can set
per_page
to say 4
to show users only the top 4 results.
You can also use the snippet field in the response, to only show the most relevant part of the field to the userAshraful Islam Mahim
08/22/2023, 1:17 PMper_page
to say 4
to show users only the top 4 results.
Yes, but the number of results is not the concern here, but rather the number of words are.
• You can also use the snippet field in the response,
Yes, but in that case, I may see the same snippet word multiple times.
You can take a look at the image.
the snippet wraps around the same word.
is there a way to increase/decrease the amount of letters to be snipetted?Jason Bosco
08/22/2023, 7:37 PMhighlight_affix_num_tokens
will control the length of the snippet, documented in this table: https://typesense.org/docs/0.25.0/api/search.html#results-parameters