#community-help

Typesense Capabilities and Troubleshooting Queries

TLDR A had issues with refinement lists and analytics in Typesense. Jason provided a possible solution and recommended the analytics widget. They clarified import size limits and helped identify a filter issue in A's query. Upgrade options are in Typesense's roadmap.

Powered by Struct AI

3

1

32
34mo
Solved
Join the chat
Mar 26, 2021 (34 months ago)
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
01:39 AM
hey! been evaluating typesense recently.. had a question
i've been trying for a few days to get multiple refinement lists to show up in the UI, but to no luck. I'm not very good with npm and these @import js workflows, so i just found an entirely compiled full vanilla JS and got it working that way. how can i get multiple refinementlists?
instantsearch.widgets.refinementList({
  container: '#refinement-list',
  attribute: 'tags',
  searchable: true,
  searchablePlaceholder: 'Search Tags',
  showMore: true,
  showMoreLimit: 20,
}),

extra: are search analytics going to be coming to typesense? as in, who searched what and when..
extra2: how many imports can typesense hosted do at one time? I've been doing 1000-2000 imports at a time because higher ones timeout
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:55 AM
Hi A I haven't used the non-npm version of instantsearch.js, but did you have to call search.addWidgets() to get the first refinementList to show up?
01:58
Jason
01:58 AM
It takes an array of widgets, so I think doing something like

instantsearch.addWidgets([instantsearch.widgets.refinementList({...}), instantsearch.widgets.refinementList({...})])

might work...

1

01:59
Jason
01:59 AM
> are search analytics going to be coming to typesense? as in, who searched what and when..
We currently don't have server-side analytics in Typesense. Instead I'd recommend using the analytics widget in InstantSearch.js to hook into search queries and send the data to either a web analytics platform like GA / Amplitude, etc or send it to a backend of their choice. With web analytics tools you usually get additional context around search terms like (search terms with the higher conversion rate), which server-side analytics won't be able to do.

1

02:01
Jason
02:01 AM
> extra2: how many imports can typesense hosted do at one time? I've been doing 1000-2000 imports at a time because higher ones timeout
I've tried imports of up to 3GB in one import call with millions of records on a 16GB RAM, 4vCPU machine.

So the answer to your question would depend on the size of the machine you're using.

1

A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
02:18 AM
the array doesnt work, just tried two different ways
02:18
A
02:18 AM
but apart from that, i'm sold! a great reply and i look forward to using typesense hosted further.
02:21
A
02:21 AM
oh whoops, ignore my last post. great! all good
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:34 AM
Awesome! 🙌
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:35 AM
is there any way to trouble shoot my typesense cluster? it says that it has imported all of my records, but the filtering counts and the "hits loaded in 10ms" is way off
04:36
A
04:36 AM
i've tried
client.collections.retrieve

which shows a correct number of documents, but the search interface is a few thousand off
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:36 AM
Could you share the exact query you’re using?
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:37 AM
what i should be seeing on the front-end:
{1=>7, 3=>593, 2=>13913}
1 = not set, 3 = dental, 2 = medical
04:37
A
04:37 AM
what i am seeing (which isnt correct)
04:38
A
04:38 AM
04:39
A
04:39 AM
  "name"=>"mcqs",
  "num_documents"=>14506,
  "num_memory_shards"=>4},
 {"created_at"=>1616719676,

@typesense.collections.retrieve
ETHON: Libcurl initialized
ETHON: performed EASY effective_url= response_code=200 return_code=ok total_time=0.589906
=> [{"created_at"=>1616732031,
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:40 AM
Could you also post the search query from the network tab in the browser?
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:40 AM
num_documents = 14506
13913 + 593 + 7 = 14513
04:40
A
04:40 AM
one sec
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:40 AM
Copy as curl would be ideal
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:42 AM
curl '' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: ' -H 'Content-Type: text/plain' -H 'Origin: ' -H 'DNT: 1' -H 'Connection: keep-alive' --data-raw '{"searches":[{"query_by":"id","num_typos":2,"sort_by":"","highlight_full_fields":"id","collection":"mcqs","q":"*","facet_by":"tags,user,multiple_choice_question_classification,published","filter_by":"published:=[true]","max_facet_values":8,"page":1,"facet_query":"tags:h","per_page":0}]}'
04:42
A
04:42 AM
replaced the API key and the url with xxx
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:43 AM
I see published true as a filter. Could that be filtering out some records
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:43 AM
ah, damn i can't believe i didnt think of this
04:43
A
04:43 AM
you're right. we're good to go
04:43
A
04:43 AM
thank you VERY much!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:44 AM
Happy to help!
A
Photo of md5-98c72c3023867be0346b48ae4cb22001
A
04:44 AM
also a request -- i am sold on type sense, would be nice to have a GUI to upgrade our deployed typesense search servers in the future
04:44
A
04:44 AM
kind of like digitalocean scale up
04:44
A
04:44 AM
but will email to upgrade when the time comes
04:45
A
04:45 AM
assuming its not on the roadmap, cheers
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:46 AM
It’s on the roadmap. Until then happy to scale clusters up from our side, if you just send an email to [email protected] with your cluster id

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

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.

1

56
21mo
Solved

Network Errors and Duplicate Requests in Typesense

Ethan and Rushil were experiencing more than 300 network errors and duplicate requests from Typesense. After rigorous troubleshooting, Jason identified the issue as an Instantsearch-induced multiple re-rendering and implemented a fix. Multiple requests reduced, but networking errors persisted, suggested to be due to client-side internet connectivity.

6

68
4mo
Solved

Resolving Typesense Analytics "top_queries" Collection Issue

Zain faced issues with typesense analytics and an empty "top_queries" collection. Jason and Kishore Nallan assisted in troubleshooting, identified a bug, and suggested a fix in `0.25.0.rc66`. The fix worked for Zain.

3

29
3mo
Solved

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.

6

111
8mo
Solved

Solving Typesense Docsearch Scraper Issues

Sandeep was having issues with Typesense's docsearch scraper and getting fewer results than with Algolia's scraper. Jason helped by sharing the query they use and advised checking the running version of the scraper. The issue was resolved when Sandeep ran the non-base regular docker image.

28
24mo
Solved