Imagine a situation where you have users from different countries and you would like to give them a choice to only see content you index that is written in their native language. Sounds quite interesting, right? Let us see how we can identify the language of the documents during indexing and store that information along with the documents in the index for later use.
For the language identification we will use one of the Solr contrib modules, but let's start from the beginning.
fieldssection of your
<field name="id" type="string" indexed="true" stored="true" required="true" ...