Custom document processing during indexing

I am new to elasticsearch. I want to do some custom processing while indexing a document and store the processed output to different set of fields. Is there any option available in elasticsearch to do custom document processing during indexing?

At this point there isn't a good option. There is a node ingest feature
under development that will help. For now I suggest doing it in your
application.

You might wish to investigate Transform to see if you can accomplish what you want that way.

Stay away from transform. It makes debugging hard and its deprecated in 2.0
and has been removed entirely in 3.0. It was written for the rare cases
when you want the source to differ from what is indexed in non-obvious
ways. It's not a document processing thing. It just kind of looks like one.

Depends what you want to do, but maybe Logstash can help?