Add language detection

(from github.com/marfago)
I would like to add language detection to the indexed documents. What is the best approach to do that?

(from github.com/marevol)
Language detection depends on https://github.com/codelibs/elasticsearch-langfield
This plugin contains language resources in https://github.com/codelibs/elasticsearch-langfield/tree/master/src/main/resources/profiles
If you want to add a new language, you need to update and replace langfield plugin.