I am writing some optimised search code which talks directly to Solr (uses HTTP requests and parses JSON responses). I am skipping the ContentSearch Sitecore API altogether. Some index fields are suffixed with _s of type string and shared (not specific versions per language). Some index fields are suffixed with _t of type text and are non-shared. When I browse the schema with the Solr admin tool, I see that the fields suffixed with _t have related fields e.g. where there is


there are also corresponding fields


Can I simply take the Sitecore context language, e.g. en-GB take the first two characters "en" and then append them to the end of my field name (provided it has the _t suffix), or is the logic more complex than this?

Is there some good way to validate field names to avoid ending up with an invalid search query?

1 Answer 1


If you have a look at index configuration, you will find something similar to

  settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider" />

That's line says that text is the only type which uses cultureFormat to create language specific versions of the fields in Solr documents.

When Sitecore adds documents to index or queries index, it checks that cultureFormat setting and uses it to include language information.

As far as I know, language information is generated using code similar to:

    ? string.Empty 
    : culture.TwoLetterISOLanguageName;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.