# Create nested type

**URL:** <https://discuss.elastic.co/t/create-nested-type/6168>\
**Category:** Elasticsearch\
**Created:** [December 15, 2011, 5:30pm UTC](https://discuss.elastic.co/t/create-nested-type/6168 "2011-12-15T17:30:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scorpiovn\_2](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@scorpiovn\_2](https://discuss.elastic.co/u/scorpiovn_2)\
**Post date:** [December 15, 2011, 5:30pm UTC](https://discuss.elastic.co/t/create-nested-type/6168/1 "2011-12-15T17:30:25Z")

</div>

Hi All,

Could any one help me create a nested type (in Java)?

Thanks so much.

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [December 16, 2011, 9:45am UTC](https://discuss.elastic.co/t/create-nested-type/6168/2 "2011-12-16T09:45:06Z")

</div>

Please ellabrate your requirement,

Thanks  
Vineeth

On Thu, Dec 15, 2011 at 11:00 PM, scorpiovn [vlsieuquang@gmail.com](mailto:vlsieuquang@gmail.com) wrote:

> Hi All,
> 
> Could any one help me create a nested type (in Java)?
> 
> Thanks so much.

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 16, 2011, 8:38pm UTC](https://discuss.elastic.co/t/create-nested-type/6168/3 "2011-12-16T20:38:11Z")

</div>

The unit tests in the source code are a great way to understand how  
the Java API works:

[https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/test/unit/index/mapper/nested/NestedMappingTests.java](https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/test/unit/index/mapper/nested/NestedMappingTests.java)

--  
Ivan

On Thu, Dec 15, 2011 at 9:30 AM, scorpiovn [vlsieuquang@gmail.com](mailto:vlsieuquang@gmail.com) wrote:

> Hi All,
> 
> Could any one help me create a nested type (in Java)?
> 
> Thanks so much.

---

<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 6, 2017, 3:45am UTC](https://discuss.elastic.co/t/create-nested-type/6168/4 "2017-07-06T03:45:06Z")

</div>


