Rate function for elasticsearch

Hi,
I want to use rate function for query elasticsearch data. how to do that?

Any suggestion?

Thanks