Multi field custom elasticsearch analyzer

I've worked on a similar project where we used a custom analyzer in our plugin, we did not use analyzerfactory so I do not know how to add on this but, we used the high level rest client which has analyzer, term vector etc API's come with it. I don't know if this is helpful but maybe you can give that a try;

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-analyze.html