Fixed the bug which was introducing an unnecessary root object in the Elasticsearch document