This project is not covered by Drupal’s security advisory policy.
An extension module to 2.x version of Search API Entity Translation module.
Changes the way in which Solr Search module stores the multilingual content, making it use solr dynamic fields for translatable entity fields.
For example, when indexing "body:value" field, solr would normally store its value in tm_body:value property. With this hook (assuming that body field is translatable and comes from translatable entity, and that currently being processed content language is fr) it will be stored in tm_fr_body:value instead, with nothing saved to default tm_body:value property.
This allows to use different datatypes for different language-based solr fields, thus allowing to configure different tokenizers/stemmers/spell checkers/stop words/protected words/etc for each language separately.
Obviously it also works when retrieving data from solr, looking for language-based dynamic fields, and, if they exist - assigning their values back to relevant Search API properties (not language-based anymore).
Additionally it modifies solr search queries run on multilingual indexes to add all possible multilingual field variants (or, if query runs on specific languages only, add field variants for those languages only) for all translatable fields being searched (which means that when tm_title_field is being searched on site with en and fr languages enabled, the search query will automatically include also tm_en_title_field and tm_fr_title_field fields in its qf parameter).
Finally, it auto-generates content for schema_extra_types.xml and schema_extra_fields.xml solr configuration files if needed. This can be found as 2 new vertical tabs within Search API server section on the Files tab.
Read more on its origins in Multilingual Search API with Entity Translation.
Requirements
- version 2.x of Search API Entity Translation module
- Search API Solr search module in version 1.2 or later (including commit 150eb8f) or applying the following module patch: #1246730: Proper way to alter the Solr Document
- note that Search API Solr search patch #2060305: Add hooks on data import and extract is no longer required!
This module has been sponsored by Commerce Guys.
Project information
- Project categories: Multilingual, Site search
39 sites report using this module
- Created by maciej.zgadzaj on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

