# How I create my first Index in ElasticSearch using Kibana?

**URL:** <https://discuss.elastic.co/t/how-i-create-my-first-index-in-elasticsearch-using-kibana/171172>\
**Category:** Elasticsearch\
**Created:** [March 6, 2019, 6:05pm UTC](https://discuss.elastic.co/t/how-i-create-my-first-index-in-elasticsearch-using-kibana/171172 "2019-03-06T18:05:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dattack13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dattack13/32/70452_2.png) [@dattack13](https://discuss.elastic.co/u/dattack13)\
**Post date:** [March 6, 2019, 6:05pm UTC](https://discuss.elastic.co/t/how-i-create-my-first-index-in-elasticsearch-using-kibana/171172/1 "2019-03-06T18:05:33Z")

</div>

I am not able to create the Index in elastic-search using Kibana. Below is my requirement compare to RDBMS -

RDBMD - Details

DB Name : "SolutionHub"  
Table 1 : "Employee.Employee"

```
{
    EMP_ID : INT
    EMP_NM : NVARCHAR(150)
    EMP_FST_NM : NVARCHAR(50)
    EMP_lST_NM : NVARCHAR(50)
}

```

Table 2 : "Employee.Address"

```
{
    ADR_ID : INT
    EMP_ID : INT
    ADR_TYP : INT
    ADR_LINE_1 : NVARCHAR(100)
    ADR_LINE_2 : NVARCHAR(100)
    ADR_LINE_3 : NVARCHAR(100)
    ADR_CNTRY : INT
    ADR_STATE : INT
    ADR_CITY : INT
    ADR_ZIP_CD : NVARCHAR(100)
}

```

Employee can have multiple address based on address type. Can anyone help me to prepare the curl statements for Kibana.

Thanks  
Gaurav Singh

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [March 7, 2019, 7:17am UTC](https://discuss.elastic.co/t/how-i-create-my-first-index-in-elasticsearch-using-kibana/171172/2 "2019-03-07T07:17:55Z")

</div>

Hello Gaurav,

I would create the following index template for this:

> ```
> POST _template/solution-hub-template
> {
> "order" : 9999,
> "index_patterns" : [
> "solution-hub-*"
> ],
> "settings" : {
> "index" : {
> "number_of_shards" : "2"
> }
> },
> "mappings" : {
> "doc" : {
> "_source" : {
> "enabled" : true
> },
> "properties" : {
> "Employee" : {
> "properties" : {
> "EMP_ID" : {
> "type" : "long"
> },
> "EMP_NM" : {
> "type" : "keyword"
> },
> "EMP_FST_NM" : {
> "type" : "keyword"
> },
> "EMP_lST_NM" : {
> "type" : "keyword"
> },
> "EMP_ADR" : {
> "properties" : {
> "ADR_ID" : {
> "type" : "long"
> },
> "ADR_TYP" : {
> "type" : "long"
> },
> "ADR_LINE_1" : {
> "type" : "text"
> },
> "ADR_LINE_2" : {
> "type" : "text"
> },
> "ADR_LINE_3" : {
> "type" : "text"
> },
> "ADR_CNTRY" : {
> "type" : "long"
> },
> "ADR_STATE" : {
> "type" : "long"
> },
> "ADR_CITY" : {
> "type" : "long"
> },
> "ADR_ZIP_CD" : {
> "type" : "keyword"
> }
> }
> }
> }
> }
> }
> }
> },
> "aliases" : { }
> }
> 
> ```

This way, address and employee are stored in the same index so I removed field EMP\_ID from the address.

EMP\_ADR does not need to be defined as array as arrays are supported out of the box: [Array Type | Elasticsearch Guide [1.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-array-type.html)

Best regards  
Wolfram

---

<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:** [April 4, 2019, 7:18am UTC](https://discuss.elastic.co/t/how-i-create-my-first-index-in-elasticsearch-using-kibana/171172/3 "2019-04-04T07:18:02Z")

</div>

Closed on April 4, 2019, 7:18am UTC

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