Typesense Multilingual Document Search
TLDR Mridul needed to search across source and translated documents. Jason and Sergio suggested putting translations in the same document, using regex with specific fields for different locales, and rebuilding the collection when adding fields.
1
May 18, 2023 (4 months ago)
Mridul
01:26 AMHowever, when the result is returned, we need it to return both the source and all its translated documents (even the one not in the match), and count a set them as 1 document
Is this possible within Typesense?
All the related documents have a relationId field which is the same
Jason
02:05 AMJason
02:05 AM{ fieldA_en, fieldA_fr, fieldA_de, fieldB_en, fieldB_fr, fieldB_de }
Mridul
03:55 AMMay 19, 2023 (4 months ago)
Sergio
09:08 AMtitle_.*
By using wildcards we could expand to future locales without major collection changes 🙂
Mridul
09:09 AMSergio
09:11 AMtitle_en
or title_es
and a new field is generated.Sergio
09:12 AMMridul
09:15 AMMridul
09:17 AMSergio
09:17 AMSergio
09:17 AMtitle_ja -> ja
title_zh -> zh
title_.* -> generic
1
Mridul
09:18 AMMridul
09:19 AMSergio
09:21 AMThere is an option to add a field to the collection, but still requires indexing all the data.
Since there is no "collection migration management" we just avoid conflicts by recreating everything and then moving the alias.
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Discussions on Typesense, Collections, and Dynamic Fields
Tugay shares plans to use Typesense for their SaaS platform and asks about collection sizes and sharding. Jason clarifies Typesense's capabilities and shares a beta feature. They discuss using unique collections per customer and new improvements. Kishore Nallan and Gabe comment on threading and data protection respectively.
Seeking Help for Locale Schema Option
David asked about the locale schema option and its documentation. Kishore Nallan explained it's a bit undocumented, but provided an example for Korean. David then expressed their e-commerce store use-case, with Kishore Nallan suggesting separate collections. Minyong also received directions regarding Korean support from Kishore Nallan.
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.
Methods for Fetching, Querying, and Modifying Collections in Typesense
Bill inquired about performing OR queries, querying empty arrays and modifying collections in Typesense. Kishore Nallan explained the current limitations and provided workarounds and recommendations for each case. The conversation also touched upon the usage of cache in Typesense and the workings of the _eval function.
Updating Collections Strategy and Faceting New Field
Nithin asked about strategies for updating collections and faceting new fields. Kishore Nallan suggested creating another collection, indexing in the background and using aliases to switch live traffic over, and shared details about the upcoming release.