Can we manipulate the idf calculation field in Elasticsearch?

I think you should look at using BM25 similarity (which is the default starting in ES 5.0). It has parameters for controlling eg the influence of field length normalization.
https://www.elastic.co/guide/en/elasticsearch/guide/current/pluggable-similarites.html