Querying MultiSearch with Typesense
TLDR Alex inquired about performing parallel multiSearch in Typesense, wanting to replicate an SQL query. Kishore Nallan informed them that multi_search executes parallel searches independently, and recommended using the filter_by
clause. However, regular expressions and prefix search cannot be used in filters.
1
1
Aug 09, 2022 (17 months ago)
Alex
02:14 PMKishore Nallan
02:15 PMAlex
02:16 PM'searches': [
{
'q': 'North Carolina',
'query_by': 'state_name',
},
{
'q': 'Sanford',
'query_by': 'city',
}
]
}, queryParams: {
'collection': 'report_header'
}).then((values) {
values.entries.forEach((element) {
print(element);
});
}).catchError((error) {
print(error);
});;
Kishore Nallan
02:17 PMAlex
02:18 PMKishore Nallan
02:19 PMq=*
and use the filter_by
clause which supports the &&
operator.Alex
02:19 PM1
Kishore Nallan
02:19 PMstate_name: North Carolina && city: Sandord
will work1
Alex
02:34 PMfor example , state_name: Nort && city: san
result state: North city: Sanford
Alex
02:35 PMKishore Nallan
02:38 PMAlex
02:39 PM'q': 'North',
'query_by': 'order.appointment_address.state_name',
'filter_by': 'order.appointment_address.city: Sanfor',
},
Alex
02:40 PMAlex
02:40 PMAlex
02:40 PMKishore Nallan
02:46 PMAlex
02:47 PMKishore Nallan
03:06 PMKishore Nallan
03:08 PMq=North Carolina Sanford
with query_by=state_name,city
?Alex
04:39 PMAlex
04:40 PMAug 10, 2022 (17 months ago)
Kishore Nallan
04:42 AMNorth Carolina Sanford
then that record will be returned first. That's not enough?Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
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.
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.
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.