Multilingual Search Solr

I am currently working on a project in which we indexed text content in SOLR. Each content is written in one specific language (we have 4 different European languages), but we would like to add a function that, if the main search (search text entered by the user) does not return a large result, we also try to find the document in other languages. Thus, we would need to somehow translate the request. Our base is that we may have a display list of translated words commonly used in the project area.

One of the solutions that came to me was to use the synonym search function. But this may not provide the best results.

Do people have pointers to existing modules that could help us achieve this multilingual search function? Or concept ideas that we are coldly trying to explore?

thanks

+5
source share
2 answers

Multilingual search does not seem to be a unique problem.

Please take a look at http://lucene.472066.n3.nabble.com/Multilingual-Search-td484201.html as well as the Solr Index and Multilingual Data Search

these two links suggest you have dedicated fields for each language, but you can also specify a field in which the language is indicated, and you can add a filter request (& fq =) for the language you found (from a user request). I think this is a more scalable solution.

+3
source

One option would be to translate your terms during the index, this could probably be done at the Solr level or even up to Solr at the application level, and then save the translated texts in different fields so that you have fields such as:

text_en: "Hello", text_fi: "Hei" 

Then you can just request text_en: Hello and it will match.

And if you want to type the primary language matches above, you can have the primary_language field, and then enlarge the documents where it will match the search language above.

+1
source

Source: https://habr.com/ru/post/1273506/


All Articles