#community-help

Merging Results of Multi-Search Queries: Workarounds and Future Features

TLDR Julian wanted to merge results from two similar collections. Kishore Nallan confirmed it's a feature that might be implemented but hasn't been prioritised. Both Julian and robert plan to use client-side solutions for now.

Powered by Struct AI
Aug 31, 2022 (14 months ago)
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
08:55 AM
Hi crowd. I was wondering if it is somehow possible to merge the results of a multi-search request on two schema-homogeneous collections? The reason I want to do this is the sorting and pagination becomes a painful issue otherwise. Thanks in advance! โœŒ
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:26 AM
It's not possible to do this apart from doing this client side.
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
09:28 AM
I was afraid so. Is it because I am doing things not they way you guys intended it for or is this a missing feature scenario?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:43 AM
It's just a missing feature scenario. We could do this I think.
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
09:44 AM
That'd be great actually! Can I help to kick this off?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:53 AM
Looks like we already have a feature request, created earlier: https://github.com/typesense/typesense/issues/381

We've not yet prioritized it in our roadmap.
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
09:56 AM
Ah, alright. I will join the thread ๐Ÿ‘
10:04
Julian
10:04 AM
Shoutout to the community for an upvote on this issue: https://github.com/typesense/typesense/issues/381 ๐Ÿ˜‡
robert
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
robert
12:45 PM
I'm running into a similar issue but with multiple searches on the same collection which I wanna aggregate for best match. I'm just doing this client side for now w/ text match sorting (results are small so pagination isn't an issue but could become issue in future)
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
02:51 PM
robert Thanks for getting on board here. I probably will have to go down the very same road. Any pitfalls or caveats you can maybe warn me of? ๐Ÿ™‚
robert
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
robert
02:54 PM
not really. i was using instantsearch in my react app but now just mostly did custom instantsearch stuff leveraging typesense client. the client is so fast i haven't seen any issues really in adding some client side filtering. my documents are relatively small too
Julian
Photo of md5-309edd752adeb3e0ea515a8c8165ce45
Julian
02:55 PM
Well, looks like it's just up to me then ๐Ÿ™‚ Thanks. It still would be great to see the feature landing on the roadmap.