# CreateIndex and NEST 6.0.0

**URL:** https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079
**Category:** Elasticsearch
**Created:** [June 15, 2018, 10:08am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079 "2018-06-15T10:08:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![csgbrs](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@csgbrs](https://discuss.elastic.co/u/csgbrs)
#### Post date: [June 15, 2018, 10:08am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/1 "2018-06-15T10:08:22Z")

</div>

We used to create our indexes using NEST 5.x and ElasticSearch 5.x. We are now trying to upgrade to elasticsearch 6.x. How do we go about creating an index using nest 6.x? Furthermore, where can documentation on NEST 6.x be found?

---

<div class="post-metadata">

### Author: ![tdasch](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@tdasch](https://discuss.elastic.co/u/tdasch)
#### Post date: [June 15, 2018, 11:28am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/2 "2018-06-15T11:28:31Z")

</div>

I found [this link](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/nest-getting-started.html#_indexing_2) for Nest 6.x index creation. Hope it helps!

---

<div class="post-metadata">

### Author: ![csgbrs](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@csgbrs](https://discuss.elastic.co/u/csgbrs)
#### Post date: [June 15, 2018, 11:50am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/3 "2018-06-15T11:50:37Z")

</div>

Thank you. Yet it shows me how to index & not really how to create the index. We now have the following line of code for creation of an index in 5.x:

ICreateIndexResponse response = this.Client.CreateIndex(new IndexName() { Name = this.IndexName }, selector);

However, now in 6.x the indexname ctor is gone & I cannot find a way to create this indexname object.

---

<div class="post-metadata">

### Author: ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)
#### Post date: [June 15, 2018, 12:45pm UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/4 "2018-06-15T12:45:13Z")

</div>

You can simply pass `this.IndexName`. There is an implicit conversion from `string` to `IndexName` type

---

<div class="post-metadata">

### Author: ![csgbrs](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@csgbrs](https://discuss.elastic.co/u/csgbrs)
#### Post date: [June 18, 2018, 8:46am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/5 "2018-06-18T08:46:32Z")

</div>

wonderful, thank you!

---

<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 16, 2018, 8:46am UTC](https://discuss.elastic.co/t/createindex-and-nest-6-0-0/136079/6 "2018-07-16T08:46:43Z")

</div>

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