update elasticsearch terms query