modifications for latest (more strict) version of elastic search