Hi all,

we are currently in search of a solution for switching between different 
languages in the query results and keeping the possibility to perform a search 
in several languages in parallel.  The overall aim would be a constant field 
name and a an additional Solr parameter "lang=XX_YY" that allows to return the 
results in the chosen language while searches are applied to all languages. 
Setting up several cores to obtain a generic field name is not an option. Does 
anyone know of a clean way to achieve this, particularly routing content 
indexed to a generic field (e.g. title) to a "background field" (e.g. title_en, 
title_fr) etc on the fly and retrieving it from there depending on the language 
chosen.

Background: So far, we have investigated the multi-language field approach 
offered by Trey Grainger in the code examples for "Solr in Action" 
(https://github.com/treygrainger/solr-in-action.git, chapter 14), an extension 
to the ordinary textField that allows to use a generic field name and the 
language is encoded at the beginning of the field content and appropriate index 
and query analyzers associated to dummy fields in schema.xml. If there is a way 
to store data in these dummy fields and additionally the lang parameter is 
added we might be done.

Thanks a lot, best regards

Johannes

Reply via email to