# New in Elasticsearch

**URL:** <https://discuss.elastic.co/t/new-in-elasticsearch/57388>\
**Category:** Elasticsearch\
**Created:** [August 5, 2016, 11:51pm UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388 "2016-08-05T23:51:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lidiar](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@lidiar](https://discuss.elastic.co/u/lidiar)\
**Post date:** [August 5, 2016, 11:51pm UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388/1 "2016-08-05T23:51:24Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 6, 2016, 4:49am UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388/2 "2016-08-06T04:49:43Z")

</div>

> [@lidiar](#):
>
> I want to save data into Elasticsearch. Can I do this without a mapping?

Yeah, it uses this - [Dynamic Mapping | Elasticsearch Guide [2.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/dynamic-mapping.html)

---

<div class="post-metadata">

**Author:** ![lidiar](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@lidiar](https://discuss.elastic.co/u/lidiar)\
**Post date:** [August 8, 2016, 10:39pm UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388/3 "2016-08-08T22:39:21Z")

</div>

Thanks for response.  
That works, but if I have:

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

And I want get a search about field3

> curl -XGET '[http://localhost:9200/data/purchases/\_sourse?pretty=true](http://localhost:9200/data/purchases/_sourse?pretty=true)' -d '{"field3" : "11"}'

I get this

> "\_index" : "data",  
> "\_type" : "purchases",  
> "\_id" : "\_sourse",  
> "found" : false

Also I try this

> curl -XGET '[http://localhost:9200/data/purchases/\_search?pretty=true](http://localhost:9200/data/purchases/_search?pretty=true)' -d '"query" : { "query\_string" : {"field3" : "11"}}'

That is wrong?

Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 8, 2016, 10:45pm UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388/4 "2016-08-08T22:45:29Z")

</div>

It can't find a document that has that value.

---

<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:29pm UTC](https://discuss.elastic.co/t/new-in-elasticsearch/57388/5 "2017-07-05T22:29:15Z")

</div>


