Updated elasticsearch querying