fix elasticsearch JSON request formulation