fix Elasticsearch blocks fatal error when no index document defined