'use per field analyzer wrapper in elasticsearch

I am creating an elasticsearch plugin where I am writing code for tokenizer and analyzer in java. There is a case scenario where I have to use the multi fields to analyze something. There are some examples available to use the perFieldAnalyzerWrapper with a standalone lucene project. But, how can I use it with elasticsearch?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source