# Elasticsearch bulk load data with multiple spaces

**URL:** <https://discuss.elastic.co/t/elasticsearch-bulk-load-data-with-multiple-spaces/198052>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 4, 2019, 1:25pm UTC](https://discuss.elastic.co/t/elasticsearch-bulk-load-data-with-multiple-spaces/198052 "2019-09-04T13:25:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkimrey](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jkimrey](https://discuss.elastic.co/u/jkimrey)\
**Post date:** [September 4, 2019, 1:25pm UTC](https://discuss.elastic.co/t/elasticsearch-bulk-load-data-with-multiple-spaces/198052/1 "2019-09-04T13:25:11Z")

</div>

I'm trying to bulk load data into elasticsearch v6.5.4 local (docker) with the following command:

curl -XPOST -H "Content-Type: application/json" "[http://localhost:9200/\_bulk?refresh=true](http://localhost:9200/_bulk?refresh=true)" --data-binary @$filename

An example of my data that is being loaded:

```
{"index":{"_index": "address","_type": "doc","_id": "G872342"}}
{"address1": "7384 MAIN STREET", "city": "NEW YORK"}

```

(Notice that the city value has multiple spaces between NEW and YORK - these spaces are expected in ES).

When the data is loaded, the city shows as "NEW YORK", not

```
"NEW YORK"

```

How can I bulk load the data with the additional spaces preserved?

Thanks.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 7, 2019, 10:57am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-load-data-with-multiple-spaces/198052/2 "2019-09-07T10:57:30Z")

</div>

Elasticsearch should not alter the document source so the spaces should be preserved. Where does it show as "NEW YORK"? Kibana? Do the JSOn documents look correct? Could it be that spaces are not shows with fixed width?

---

<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:** [October 5, 2019, 10:57am UTC](https://discuss.elastic.co/t/elasticsearch-bulk-load-data-with-multiple-spaces/198052/3 "2019-10-05T10:57:32Z")

</div>

Closed on October 5, 2019, 10:57am UTC

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