#community-help

Multi-Language Search Attribute in Typesense

TLDR Tugay is considering multi-language search on their platform and consulted with Kishore Nallan regarding their issue. Kishore Nallan directed them to a related typesense issue.

Powered by Struct AI
10
25mo
Solved
Join the chat
Oct 20, 2021 (25 months ago)
Tugay
Photo of md5-e920cc88c8354329d64e9a0332a7e5e2
Tugay
08:59 AM
Also I have another question we are trying to enable multi language search for our platform but when user adds a new language we need to update all documents with new search attribute such as {"search": "Default Product Name", "search_de": "Product name in deutsch", ...}but we want to use default search attribute if there is no search_de exists in document instead, in this way we don’t need to update all documents do you have a suggestion to resolve this issue or should we have to update all documents?
09:05
Tugay
09:05 AM
or will you consider adding this feature to typesense in future?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:08 AM
Is it the case that you want to fallback to a generic (maybe english) field when a language specific field does not exist in a document?
09:09
Kishore Nallan
09:09 AM
Is it possible for one document to have a language specific field but another one not to have it? Tugay
Tugay
Photo of md5-e920cc88c8354329d64e9a0332a7e5e2
Tugay
09:12 AM
yes to prevent that we are automatically adding new search_de field to all documents with same default search value then user updates search_de for specific documents if he wants to
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:14 AM
This will require some kind of special syntax during query time, which can do something like use this field if it exists or use another default field
09:15
Kishore Nallan
09:15 AM
Tugay
Photo of md5-e920cc88c8354329d64e9a0332a7e5e2
Tugay
09:15 AM
like query_by=searche_de|search,brand right?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
09:19 AM
Right. Can you please add your use case as a comment to the github issue above? We will have to arrive at a syntax that can cover all these cases.
Tugay
Photo of md5-e920cc88c8354329d64e9a0332a7e5e2
Tugay
09:20 AM
Of course adding it 👍