# Create Index and Mappings

**URL:** <https://discuss.elastic.co/t/create-index-and-mappings/193096>\
**Category:** Elasticsearch\
**Created:** [July 31, 2019, 10:55am UTC](https://discuss.elastic.co/t/create-index-and-mappings/193096 "2019-07-31T10:55:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naveedyousaf03](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Naveedyousaf03](https://discuss.elastic.co/u/Naveedyousaf03)\
**Post date:** [July 31, 2019, 10:55am UTC](https://discuss.elastic.co/t/create-index-and-mappings/193096/1 "2019-07-31T10:55:19Z")

</div>

Hi all,  
I am running elasticsearch dot net Version 7.1.0 and using elastic search 6.3.0. I want to know if index exist or not. If it exist then index data otherwise create the index with mappings but i am unable to do so. What i have done is as given below  
var request = client.Indices.Exists\<ElasticSearchRelated.ElasticSearchResponse\>  
("3YrsCustomerData");  
it will check if index exist or not but how would i be able to create index as there is no api for that

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9df95615a4eacca63d987eb245e174321576f1ed.png) this is only create and create async api.

---

<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:** [August 28, 2019, 10:55am UTC](https://discuss.elastic.co/t/create-index-and-mappings/193096/2 "2019-08-28T10:55:32Z")

</div>

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