# Could not able to create index-pattern in 6.x

**URL:** <https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613>\
**Category:** Kibana\
**Created:** [February 13, 2018, 10:24am UTC](https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613 "2018-02-13T10:24:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohit\_Raghoji](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@Rohit\_Raghoji](https://discuss.elastic.co/u/Rohit_Raghoji)\
**Post date:** [February 13, 2018, 10:24am UTC](https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613/1 "2018-02-13T10:24:07Z")

</div>

Hi

i am trying to create index-pattern from query, index-pattern got created but no feilds are there in that and it is giving some errors

i used bellow query to create index-pattern in elasticsearch

> POST /.kibana/doc/test  
> {  
> "type": "index-pattern",  
> "index-pattern" : {  
> "title": "test",  
> "timeFieldName": "post\_date"  
> }  
> }

and i am getting bellow error  
**Could not locate that index-pattern (id: test), click here to re-create it**

Please help

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [February 14, 2018, 9:16pm UTC](https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613/2 "2018-02-14T21:16:40Z")

</div>

Try prefixing the document ID with `index-pattern:`

```auto
POST /.kibana/doc/index-pattern:test
{
  "type": "index-pattern",
  "index-pattern": {
    "title": "test",
    "timeFieldName": "post_date"
  }
}

```

---

<div class="post-metadata">

**Author:** ![Rohit\_Raghoji](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@Rohit\_Raghoji](https://discuss.elastic.co/u/Rohit_Raghoji)\
**Post date:** [February 15, 2018, 7:05am UTC](https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613/3 "2018-02-15T07:05:07Z")

</div>

Hi @Bargs

Thanks for the reply, it got worked 🙂

---

<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:** [March 15, 2018, 7:05am UTC](https://discuss.elastic.co/t/could-not-able-to-create-index-pattern-in-6-x/119613/4 "2018-03-15T07:05:16Z")

</div>

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