Including All Individual Documents in a Group in Typesense
TLDR Magnus was uncertain how to include all documents within a group in Typesense, and specifically asked about ecommerce product cards. Jason published a new version of Typesense Instantsearch Adapter and advised storing all variant information for a product on each document. Magnus confirmed this as a viable solution.
Jun 29, 2022 (15 months ago)
I am playing with group_by and group_limit. I can see the structure for a grouped document is slightly different but was then wondering, if there’s a way to include all of the individual documents that is contained in a group. I know that might sound counter intuitive but would be useful in a case, where you want to show information from the grouped documents. The specific case is this product cards on an ecommerce site. Here’s a screenshot that maybe explains it better:
group_limitto a large number (even as high as say 10,000) assuming that's the max number of variations you can have in a product, should work...
Jun 30, 2022 (15 months ago)
See pictures, for how it currently looks and the response result.
Instantsearch.js seems to have a
distinctconfigure option but can that work with the typesense adapter — not sure if it’s at all relevant?
I’ve attempted to transform the hits but the hit results does not contain data about the group.
How would I go about combining them into a single ‘hit’ for Instantsearch?
Thank you 🙂
I was going to suggest this... but the adapter doesn't add this group information currently. Let me add this and give you a version to test
Jul 01, 2022 (15 months ago)
I might have run into other troubles that I hadn’t thought about. But I’ll report back when I have more information 🙂
Anyhow, I might have to index variant information on every document. My current issue is, that I want to show shoe size availability and color variant on a single hit/model (product card). But with grouping I am not certain to get every document belonging to that group obviously. Eg. if I query “nike free blue”, I will only get the documents for the blue variant and not the red variant, even though I want to show that as well.
I haven’t explored the issue thoroughly yet. But if you have any ideas they’re more than welcome 😉
Indexed 2764 threads (79% resolved)
User-Specific Tagging and Filtering in UI
bnfd asked for the best way to create user-specific tags available on the UI. Jason suggested using personalized filters and creating a separate collection for each user's movies. The duo clarified the use of 'tags' in schemas and the refinementList widget in instantsearch. They also discussed various approaches to import and search large document collections.
Revisiting Typesense for Efficient DB Indexing and Querying
kopach experienced slow indexing and crashes with Typesense. The community suggested to use batch import and check the server's resources. Improvements were made but additional support was needed for special characters and multi-search queries.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.
Ecommerce Search Engine with User-added Products
Max seeks advice on handling a boolean field showing if a product is already in a user's cart for an ecommerce search engine. Kishore Nallan suggests waiting for the future "join" feature to allow merging separate indexes at query time.
Implementing Histogram Slider with Typesense
em1nos asked about implementing a histogram slider with typesense. James suggested using facets and group by feature. Jason recommended creating a new field for price buckets to achieve the desired output using facet_counts.