text_en
, text_es
, etc.
defined and leave all but the appropriate one null.
As with databases, we have to decide whether it's better to store all of your content in a single Solr index with language-specific fields or to use a separate cores for each language. Because Solr likes to have a single document field and to avoid needing to manage sets of per-language translated field names in queries, I generally recommend the latter approach, especially if your data is not synchronized across languages.
The Solr example schema lists reasonable defaults for most languages. You should plan to have a native speaker review your results once you have realistic test data available.
Haystack 1.x only supports a single Solr backend, which
requires some work to use multiple cores. When version 2.0 is
stable, this will mostly become a simple
.using(lang)
call.
SearchQuerySet()
update_index
and
clear_index
management commands which use the
language-specific backends and filter database queries
accordingly
/
#