# Create Index of template

**URL:** <https://discuss.elastic.co/t/create-index-of-template/105437>\
**Category:** Elasticsearch\
**Created:** [October 26, 2017, 1:53pm UTC](https://discuss.elastic.co/t/create-index-of-template/105437 "2017-10-26T13:53:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Staggerlee011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/staggerlee011/32/23466_2.png) [@Staggerlee011](https://discuss.elastic.co/u/Staggerlee011)\
**Post date:** [October 26, 2017, 1:53pm UTC](https://discuss.elastic.co/t/create-index-of-template/105437/1 "2017-10-26T13:53:50Z")

</div>

Below is my index template

```
post _template/sqldb_template
    {
      "template" : "sqldb-*",
      "aliases" : {
        "sqldb" : {}
      },
      "settings" : {
        "index" : {
          "number_of_shards" : 5,
          "number_of_replicas" : 0
        }
      },
      "mappings" : {
        "sqldb_size" : {
          "properties" : {
            "date" : {
              "type" : "date"
            },
            "server" : {
              "type" : "keyword"
            },
             "database" : {
              "type" : "keyword"
            },
            "logicalName" : {
              "type" : "keyword"
            },
            "fieldType" : {
              "type" : "keyword"
            },
            "usedSpace" : {
              "type" : "long"
            }
          }
        }
      }
    }

```

I can load data into it via this via standard curl commands. I can then see it in kibana dev tools using:

```
get sqldb_sqldb_size/_count 

    {
      "count": 838,
      "_shards": {
        "total": 5,
        "successful": 5,
        "skipped": 0,
        "failed": 0
      }
    }

```

But if i run

I get:  
get sqldb/sqldb\_size  
{  
"error": {  
"root\_cause": [  
{  
"type": "illegal\_argument\_exception",  
"reason": "No endpoint or operation is available at [sqldb\_size]"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "No endpoint or operation is available at [sqldb\_size]"  
},  
"status": 400  
}

If i add the index to kibana index patterns (It finds the date field and shows up and looks good

But if i try and discover on it says no results found?!

Any idea whats happened?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 27, 2017, 3:30pm UTC](https://discuss.elastic.co/t/create-index-of-template/105437/2 "2017-10-27T15:30:23Z")

</div>

this does not look like an officially supported feature from elasticsearch, but like a third party plugin. Maybe ping the authors of the plugin and find out more.

---

<div class="post-metadata">

**Author:** ![Staggerlee011](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/staggerlee011/32/23466_2.png) [@Staggerlee011](https://discuss.elastic.co/u/Staggerlee011)\
**Post date:** [November 2, 2017, 9:02am UTC](https://discuss.elastic.co/t/create-index-of-template/105437/3 "2017-11-02T09:02:24Z")

</div>

Hi, Thanks for the reply..

Definitely not a plugin..(that i know off)

From what i understand (which could be wrong!) im trying to do "Rolling Indices"..

Steps from what i understand are:

Create a template:  
[indices templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html)

This, i think should let me create a new index if i name it starting "sqldb-" with the same mappings as the template? and all the individual indexes can be read on "sqldb" . Based on my example above.

What bit do you think is a plugin?

S

---

<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:** [November 30, 2017, 9:02am UTC](https://discuss.elastic.co/t/create-index-of-template/105437/4 "2017-11-30T09:02:41Z")

</div>

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