Hello I'm new using Elasticsearch and I have some questions:
I want to save data into Elasticsearch. Can I do this without a mapping? If this is posible something like this is correct?
curl -XPOST 'http://localhost:9200/my_template/_bulk' -d '{"field1":"field1","field1":"string","field2":integer,"field3":"item","field4":"integer","properties":{"field5":"integer","field6":"array","field7":"integer"},"field8":{"date":"2015-12-30 13:30:05.000000","timezone_type":3,"timezone":"Europe/Zurich"}}'
If this is not possible. This is correct?
{"settings" : {"index" : {"number_of_shards" : 3, "number_of_replicas" : 2}}, "template": "My_template","type": "object", "mappings": {"properties" : {"id": {"type": "string"},"field1" : {"type": "string"},"field2" : {"type": "string"},"field3" : {"type": "string"},"field4" : {"type": "string"},"field5" : {"type": "string"},"field6" : {"type": "object","properties": {"field6.1": {"type": "string"},"field6.2": {"type": "string","items": {"type": "string"}},"field7": {"type": "int"}},"field8" : {"type": "date", "format" : "basic_date_time_no_millis"}}}}}
This get me an error with type and date format.
When I save data into Elasticsearch. Is normal that I lose 1G on my disk? I can save a mapping and I lose 1G on my disk.
Thanks!
Regards.