# Indexing failure when using bulk API

**URL:** <https://discuss.elastic.co/t/indexing-failure-when-using-bulk-api/41621>\
**Category:** Elasticsearch\
**Created:** [February 12, 2016, 2:17pm UTC](https://discuss.elastic.co/t/indexing-failure-when-using-bulk-api/41621 "2016-02-12T14:17:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fadi](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@fadi](https://discuss.elastic.co/u/fadi)\
**Post date:** [February 12, 2016, 2:17pm UTC](https://discuss.elastic.co/t/indexing-failure-when-using-bulk-api/41621/1 "2016-02-12T14:17:06Z")

</div>

Experienced an error while indexing content from drupal to elasticsearch installed on same VM. Noticed two things from elasticsearch logs below:

- failed to parse, document is empty.
- 'defaiya\_articles\_alias' alias which i think it was created automatically on first bulk operation occured.

Am using Elasticsearch 1.7.4 along drupal module elasticsearch\_connector-7.x-1.0-alpha9

This happens when posting with Bulk endpoint localhost:9200/defaiya\_articles/defaiya\_articles/\_bulk?refresh=1

I have no clue about whats happening but i know am missing some configuration on elasticsearch. That because drupal module was working fine with a trial service from [found.elasic.co](http://found.elasic.co).

## Elasticsearch log

> [2016-02-12 09:05:37,968][DEBUG][action.index] [Lucifer] [defaiya\_articles][0], node[jDATrKcOQc2i0x7FmkSRNA], [P], s[STARTED]: Failed to execute [index {[defaiya\_articles\_alias][defaiya\_articles][AVLUTKGwN3desrFRGnhC], source[na]}] org.elasticsearch.index.mapper.MapperParsingException: failed to parse, document is empty at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:562) at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:493) at org.elasticsearch.index.shard.IndexShard.prepareCreate(IndexShard.java:465) at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:201) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase.performOnPrimary(TransportShardReplicationOperationAction.java:574) at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$PrimaryPhase$1.doRun(TransportShardReplicationOperationAction.java:440) at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:36) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

## Index information

> { "defaiya\_articles" : { "aliases" : { "defaiya\_articles\_alias" : { } }, "mappings" : { "defaiya\_articles" : { "properties" : { "articledate" : { "type" : "date", "format" : "yyyy-MM-dd HH:mm:ss" }, "body:value" : { "type" : "string" }, "id" : { "type" : "integer", "include\_in\_all" : false }, "search\_api\_language" : { "type" : "string", "index" : "not\_analyzed" }, "title" : { "type" : "string" } } } }, "settings" : { "index" : { "creation\_date" : "1454879612879", "uuid" : "b5ljdnseQc2ZFDGLliYTLA", "number\_of\_replicas" : "1", "number\_of\_shards" : "1", "version" : { "created" : "1070499" } } }, "warmers" : { } } }

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/indexing-failure-when-using-bulk-api/41621/2 "2017-07-05T23:16:52Z")

</div>


