Sitecore XP automatically creates dynamic fields for certain languages. A message similar to the following might be found in the logs when using the Solr search provider and indexing items in the Polish language:
9524 2015:06:25 14:52:03
WARN Crawler : AddRecursive DoItemAdd failed - {6601373B-C31A-43D7-8DD8-6429ACA38298} Exception: SolrNet.Exceptions.SolrConnectionException Message: <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">400</int><int name="QTime">98</int></lst>
<lst name="error"><str name="msg">
ERROR:
[doc=sitecore://master/{110d559f-dea5-42ea-9c1c-8a5df7e70ef9}?lang=pl-pl&ver=1&ndx=sitecore_master_index] unknown field 'title_t_pl'</str>
<int name="code">400</int></lst>
</response>
Option 1
<fieldType name="text_pl" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StempelPolishStemFilterFactory"/> </analyzer> </fieldType>
<dynamicField name="*_t_pl" type="text_pl" indexed="true" stored="true" />
or (when not creating a language-specific field type):
<dynamicField name="*_t_pl" type="text_general" indexed="true" stored="true" />
Note: If you populate the Solr schema using Sitecore, the changes will be overwritten. Normally, this step is only run during deployment of a new environment or after upgrading to a later version of the product. Check Option 2 if you want to make sure that the changes cannot be accidentally overwritten.
Option 2
Alternatively, changes to the Solr schema can be introduced by code.
Note
The steps given in the Solution can be used to add support for other languages.