json format can be given by _BULK API
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..
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).
when does elastic search perform best (in context of performance testing)
- with indexing data format in JSON (or)
- with indexing data format in CSV
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.
There is a caveat. Elasticsearch can support different encodings for that JSON.
Namely you can read/write/store data in several json-like formats. That would be:
- JSON itself
- 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 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.