# Choosing between datatypes

**URL:** <https://discuss.elastic.co/t/choosing-between-datatypes/168583>\
**Category:** Elasticsearch\
**Created:** [February 15, 2019, 12:19pm UTC](https://discuss.elastic.co/t/choosing-between-datatypes/168583 "2019-02-15T12:19:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gued](https://avatars.discourse-cdn.com/v4/letter/g/ecae2f/32.png) [@gued](https://discuss.elastic.co/u/gued)\
**Post date:** [February 15, 2019, 12:19pm UTC](https://discuss.elastic.co/t/choosing-between-datatypes/168583/1 "2019-02-15T12:19:39Z")

</div>

Hello!

I have recently started using elasticsearch, and my data is a json file containing three other json-files. Heres my question: How should I choose a correct doc\_type? The documentation states that "nested" types will allow elastic to index my nested json-file more correctly. However doing this results in an error, saying that the type is already "json".

But isn't all files inserted jsons, and you simply change the type of it? Or have I misunderstood it? Thanks in advance!

Regards  
A simple student

---

<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:** [March 15, 2019, 12:19pm UTC](https://discuss.elastic.co/t/choosing-between-datatypes/168583/2 "2019-03-15T12:19:42Z")

</div>

Closed on March 15, 2019, 12:19pm UTC

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