# Extra " while using bulk api

**URL:** https://discuss.elastic.co/t/extra-while-using-bulk-api/89233
**Category:** Elasticsearch
**Created:** [June 13, 2017, 4:00pm UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233 "2017-06-13T16:00:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kaushah](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaushah](https://discuss.elastic.co/u/kaushah)
#### Post date: [June 13, 2017, 4:00pm UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233/1 "2017-06-13T16:00:15Z")

</div>

I am using Bulk Java Api into ingest the data into the ElasticSearch.

```
            JsonNode rootNode = mapper.readTree(json);  
    	Iterator<Map.Entry<String,JsonNode>> fieldsIterator = rootNode.getFields();
    	
    	Map<String, String> bulkData = new HashMap<String, String>();
    	
    	while (fieldsIterator.hasNext()) {
   
    		Map.Entry<String,JsonNode> field = fieldsIterator.next();
    		bulkData.put(field.getKey(), field.getValue().toString());
    		
    	}
    	
    	bulkRequest.add(client.prepareIndex("Testing", "Test1")
		        .setSource(bulkData)
		        );
    	BulkResponse bulkResponse = bulkRequest.get();
    		if (bulkResponse.hasFailures()) {
    			System.out.println("A problem ocurred in the bulk process");
    		    // process failures by iterating through each bulk response item
    		}

```

However, when I check the data in ElasticSearch, I get the following:

"Key" : """"Value""""

I checked my Hashmap values before inserting but it is fine.  
What is the reason for the extra double quotes in the values of ElasticSearch?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [June 14, 2017, 7:48am UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233/2 "2017-06-14T07:48:40Z")

</div>

Hey,

I suppose you checked the data in kibana? If so, that is just a display trick to be able to display data over multiple lines. If you use curl/wget you will see, that this is not an issue in your actual data.

--Alex

---

<div class="post-metadata">

### Author: ![kaushah](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kaushah](https://discuss.elastic.co/u/kaushah)
#### Post date: [June 14, 2017, 5:16pm UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233/3 "2017-06-14T17:16:56Z")

</div>

Thank you for the reply.  
I tried cURL on terminal, the data is now of the form:  
"Key" : ""Value""

i wonder why the escape character is appended in the data?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [June 16, 2017, 10:02am UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233/4 "2017-06-16T10:02:41Z")

</div>

Those extra ticks are definately from your application indexing data into Elasticsearch, so I assume it existed before.

--Alex

---

<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 14, 2017, 10:02am UTC](https://discuss.elastic.co/t/extra-while-using-bulk-api/89233/5 "2017-07-14T10:02:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
