# Is there any other way of indexing data into elasticsearch other than json

**URL:** <https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905>\
**Category:** Elasticsearch\
**Created:** [August 12, 2016, 9:27am UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905 "2016-08-12T09:27:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth\_muddu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@srikanth\_muddu](https://discuss.elastic.co/u/srikanth_muddu)\
**Post date:** [August 12, 2016, 9:27am UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/1 "2016-08-12T09:27:35Z")

</div>

json format can be given by \_BULK API  
[1.To](http://1.To) index into ES is there any other way or format(not json) which is read by elasticsearch  
2.Also i dont require logstash as it can send csv format.  
Only elastic search and its accepting format types..

please reply,..

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 12, 2016, 9:40am UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/2 "2016-08-12T09:40:47Z")

</div>

Elasticsearch only supports JSON.

If you want to send something else you need to transform it. You can use logstash or whatever other system (even your code).

---

<div class="post-metadata">

**Author:** ![srikanth\_muddu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@srikanth\_muddu](https://discuss.elastic.co/u/srikanth_muddu)\
**Post date:** [August 12, 2016, 10:04am UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/3 "2016-08-12T10:04:06Z")

</div>

thank you.  
when does elastic search perform best (in context of performance testing)

1. with indexing data format in JSON (or)
2. with indexing data format in CSV

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 12, 2016, 11:00pm UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/4 "2016-08-12T23:00:24Z")

</div>

It does not make sense. As I said you can only send json docs to Elasticsearch.

Note that in Kibana 5, you'll be able to upload CSV directly from the interface.

---

<div class="post-metadata">

**Author:** ![taras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taras/32/507_2.png) [@taras](https://discuss.elastic.co/u/taras)\
**Post date:** [August 13, 2016, 12:01am UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/5 "2016-08-13T00:01:26Z")

</div>

There is a caveat. Elasticsearch can support different encodings for that _JSON_.

Namely you can read/write/store data in several [json-like formats](https://github.com/elastic/elasticsearch/blob/2.4/core/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java#L104). That would be:

- JSON itself
- YAML
- Smile - has better serialization performance than json, but can be larger than JSON if storing many small numbers.
- CBOR - much better performance than json. variable size number encoding which saves space. But unfortunately there is no [bulk support](https://github.com/elastic/elasticsearch/issues/8481) for CBOR format.

In order to utilize these formats you have to talk to ES via native driver and not JSON interface.

So yes, if you're looking to squeeze a little extra out of the server I would advise using _Smile_ until _CBOR_ support is complete.

---

<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, 10:27pm UTC](https://discuss.elastic.co/t/is-there-any-other-way-of-indexing-data-into-elasticsearch-other-than-json/57905/6 "2017-07-05T22:27:55Z")

</div>


