Plugin to replace existing FetchPhase functionality in Elasticsearch


I am looking to replace some existing 'fetch' functionality in the fetch phase in Elasticsearch using my own plugin. I was hoping that someone could point me to a good guide which would show me how a plugin would replace existing functionality? I have written a basic plugin with a separate end point which doesn't modify any of the existing functionality. I'm not quite sure how to go about modifying existing modules in Elasticsearch with a plugin.

It seems like it is possible reading this link -

Basically, the idea is to add an option parameter to the search query in the URL, which would not return the _id field back with the result. The hope is to return a large dataset of records with a doc_values field in the document.