I understand there are good reasons to prevent this for the "average user" but I would beg you to restore the functionality for those who know what they are doing.
There are perfectly valid use cases to use a different Analyzer at query time rather than indexing time, for example when handling synonyms at indexing time you don't need to apply the substitutions again at query time.
Beyond synonyms, it's also possible to have text of different sources which has been pre-processed in different ways, so needs to be tokenized differently to get a consistent output.
I love the idea of Lucene to become more strict regarding to consistent schema choices, but I would hope we could stick to field types and encoding, while Analyzer mappings can use a bit more flexibility?
Would you accept a patch to overload
org.apache.lucene.index.IndexWriter.updateDocument(Term, Iterable<? extends IndexableField>)
with the expert version:
org.apache.lucene.index.IndexWriter.updateDocument(Term, Iterable<? extends IndexableField>, Analyzer overrideAnalyzer)
That would greatly help me to migrate to Lucene 5. My alternatives are to close/open the IndexWriter for each Analyzer change but that would have a significant performance impact; I'd rather cheat and pass an Analyzer instance which is mutable, even if that would prevent me from using the IndexWriter concurrently.