I have a fresh installation of Alfresco 5.1, running by default Solr 4.
I wrote a custom analyzer (for my custom needs) which first detects the language of the document/query and then redirects to the correct analyzer. After doing that, I went to the solr schema files and update all locale field "text_[locale]" to use my custom analyzer for both "index" and "query".
I have been using this analyzer for a previous alfresco version 4.2.c which uses Solr 1.4. So of course I have update my API to use the correct lucene version and all the required changes.
The issue I am having is that during index process; my analyzer is not able to read the text (in fact it only reads values like "doclib" and "Company home") when I upload a document, thus cannot detect the language. However, during query phase, if type a query in the search bar, my analyzer is able to get the query text and detect its language (even from real-time search).
I have tested the analyzer from the Solr admin panel. It was able to read and handle the input of both Query and Index operations. So I think this is a bit specific to alfresco.
Thank you for taking the time to read through all of this.
Have a good day!