Elasticsearch bulk load data with multiple spaces

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" --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


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


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?

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