Customizing Snippets and Highlighting in Document Searches
TLDR bnfd wants to customize snippeting, highlighting and show multiple snippets in a search. Jason suggests using snippet_threshold
, highlight_full_fields
, opening a GitHub issue and breaking long documents into smaller parts.
1
Aug 24, 2021 (27 months ago)
bnfd
06:42 PMJason
07:04 PMsnippet_threshold
which might be helpful.There's also
highlight_full_fields
to get the full field and then you could snippet on the client-sideJason
07:04 PMbnfd
07:06 PMbnfd
07:23 PMJason
07:27 PMThat's correct.
> long document (let's say 20 pages) there are 10 occurrences of "foo" so I'd like to show 10 snippets for document1 instead of the whole document. Is this possible?
I guess I misunderstood your original ask. This is not possible at the moment. But for long documents, to keep search relevancy and speed good, I'd recommend breaking them up into say one paragraph per record.
That will also solve what you're looking to do indirectly, because then you can show 10 different snippets, 1 snippet from each document (paragraph)
Jason
07:29 PMThe different in Typesense is that there is no limit to number of characters per document, but Algolia enforces a hard limit of 1K per document. So with Typesense we let you make the call on how large a document should be
1
bnfd
07:34 PMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
User-Specific Tagging and Filtering in UI
bnfd asked for the best way to create user-specific tags available on the UI. Jason suggested using personalized filters and creating a separate collection for each user's movies. The duo clarified the use of 'tags' in schemas and the refinementList widget in instantsearch. They also discussed various approaches to import and search large document collections.
Discussing Search Functionality in Custom Blogging Platform
Martin discussed his blogging platform's search functionality and its use of Typesense for full text search. Jason provided feedback and suggested a hybrid solution for the search bar. Improvements will be made based on further user feedback.
Querying and Indexing Multiple Elements Issues
Krish queried fields with multiple elements, which Kishore Nallan suggested checking `drop_tokens_threshold`. Krish wished to force OR mode for token, but Kishore Nallan admitted the feature was missing. Krish was able to resolve the issue with url encoding.
Troubleshooting Typesense Setup and Understanding Facets and Keywords
Demitri encountered errors when exploring Typesense for the first time. Jason guided them through troubleshooting and discussed facets, keyword settings, and widget configurations. Helin shared a Python demo app and its source code to help Demitri with their project.
Resolving Typesense Result Issue in Document Collection Queries
Mike was encountering errors when searching for specific query in their Typesense document collection. Jason suggested it may be due to the `drop_tokens_threshold` setting. There was a misunderstanding but after further explanation from Jason, Mike understood and decided to continue the conversation via email.