Discussing Typesense Search Request Performance
TLDR Al experienced longer-than-reported times for Typesense search requests, sparking a detailed examination of json parsing, response times and data transfer. Jason and Kishore Nallan helped solve the issue.
1
1
May 17, 2021 (31 months ago)
Al
07:06 PMLong thread incoming, but you would probably appreciate my findings.
I have noticed that, when running multiple search requests in a single one (i.e. multisearch) the time it takes to complete the requests does not match the time reported by the individual search_time_mss.
Al
07:07 PMAl
07:07 PMAnd the final value is the time it took for everything to run.
If you take the 2nd column and sum all the values, you would get something like 200 ms, but for whatever reason, the whole thing takes about twice the time to execute.
Al
07:11 PMJason
09:53 PMYou could disable some document fields from being returned using the
exclude_fields
search parameter, but there's no way to disable snippets at the moment.Jason
09:54 PM1
Al
10:56 PMAl
10:59 PMJason
11:02 PMAl
11:03 PMOne path uses multisearch, the other is just Promise.all(<with a lot of single searches>) (so they run concurrently)
Results are pretty much the same on both paths. Same time per query, same overhead, same time overall (+- 20ms or so).
Jason
11:11 PMAl
11:26 PMJason
11:26 PMJason
11:26 PMAl
11:27 PMJason
11:27 PMAl
11:27 PM1
Al
11:43 PMJason
11:45 PMAl
11:46 PMMay 18, 2021 (31 months ago)
Kishore Nallan
05:21 AMKishore Nallan
06:06 AM74 ms
. This is on Typesense v0.20.0 Docker image. I will email you the query snippet I used so that we can compare results.Al
06:16 AMKishore Nallan
06:16 AMAl
06:17 AMKishore Nallan
06:22 AMAl
06:23 AMAl
06:48 AMKishore Nallan
06:50 AMMay 19, 2021 (31 months ago)
Al
02:08 AMKishore Nallan
02:16 AMexclude_fields
?Al
02:28 AMAl
03:31 PMKishore Nallan
03:32 PMKishore Nallan
03:35 PMMay 20, 2021 (30 months ago)
Al
02:42 PMKishore Nallan
02:51 PMTypesense
Indexed 2786 threads (79% resolved)
Similar Threads
Understanding Indexing and Search-As-You-Type In Typesense
Steven had queries about indexing and search-as-you-type in Typesense. Jason clarified that bulk updates are faster and search-as-you-type is resource intensive but worth it. The discussion also included querying benchmarks and Typesense's drop_tokens_threshold parameter, with participation from bnfd.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.
Integrating Semantic Search with Typesense
Krish wants to integrate a semantic search functionality with typesense but struggles with the limitations. Kishore Nallan provides resources, clarifications and workarounds to the raised issues.
Optimizing Typesense Implementation for Large Collections
Oskar faced performance issues with his document collection in Typesense due to filter additions. Jason suggested trying a newer Typesense build and potentially partitioning the data into country-wise collections. They also discussed reducing network latency with CDN solutions.
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.