Multiple Filters and JSON Requests in Typesense
TLDR 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.
Jun 16, 2023 (6 months ago)
filter_by: field1:=a && field2:=b
Under “Multiple Conditions”
I have a search query [free text], example Operations Manager
Filters: employment-type = ‘full-time’, job-type=‘remote’, country = ‘Germany’
these are all facets with counts on them.
Naturally when you pick a filter - example full time, the count for all other employment-types is set to 0. I need to be able to show the count for part-time aswell even though you clicked on ‘full-time’, also other filters now would reflect the total count, example, job-type now has only 10 full-time jobs that are of job-type = remote.
The idea is to send another query to get facet counts using existing query + filters, except for the ones you’re active on, example on the employment-type.
This query would look like this:
search: Operations Manager,
Filters: job-type = ‘remote’, country = ‘Germany’
You see I purposely didn’t include the ‘employment-type’ filter, this way it would me facet counts for full-time and part time.
If you open the browser dev console, and then the network tab, then click on some of the filters, you’ll see the type of queries generated inside the multi-search request
just this could run on 2vCPU and 1GB memory?
Jun 20, 2023 (5 months ago)
query_byparameter is outside the JSON, while all the rest of them are within the JSON. Why?
Indexed 3015 threads (79% resolved)
Discussing Typesense Search Request Performance
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.
Moving from Algolia to Typesense: Questions and Answers
Juan sought advice from Kishore Nallan about moving from Algolia to Typesense, handling MultiSearch, setting parameters, checking imported documents, and a specific syntax query.
Enhancing Vector Search Performance and Response Time using Multi-Search Feature
Bill faced performance issues with vector search using multi_search feature. Jason and Kishore Nallan suggested running models on a GPU and excluding large fields from the search. Through discussion, it was established that adding more CPUs and enabling server-side caching could enhance performance. The thread concluded with the user reaching a resolution.
Improving Record Retrieval Speed from Typesense
Yoshi sought ways to accelerate Typesense record retrieval. Jason advised upgrading to high availability and using the documents/export endpoint. They also noted a high volume of writes consuming significant CPU capacity as a possible performance factor.
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.