The patch allows to further enhance the feature in #2294645: Support aggregate fields: the translatable flag of each aggregated field (added by patch in #2502883: Aggregated fields with ET integration) is used to better handle the translation indexing of aggregated fields, and to skip fields that do not needs to be indexed with language-specific analyzers in SOLR.
Use case: we are using this solution for query auto-complete (with search_api_autocomplete module). In most cases the suggested terms must NOT came from standard language-analyzed fields since the stemming process is producing "truncated" terms that are not understandable to users. As an example, the stemming process produces "comput" for words like "computer, "computability", "computing" and we don't want to propose "comput" as a suggested term to users, but any of the not-stemmed words.
The solution adopted is to create an aggregated full-text field containing most of the node contents (coming from title, terms, body and abstract), set this field as 'not translatable' (with the current feature) and use just this field as the source for auto-complete.
It is also important to fix the standard configuration of full-text fields indexing: in schema.xml the PorterStemmer analyzer (for English language) is used even if the default language is not english, this could produce weird auto-complete terms for languages other then English (such as French or Italian).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2502921-aggregated-fields-with-et-translation-2.patch | 3.28 KB | thepanz |
Comments
Comment #1
thepanz commentedThe given patch also includes patch from #2501139: "Clean-IDs" not respected while fields translation checking.
Comment #2
thepanz commentedRe-rolled patch, further checks to avoid PHP notices.