# Creating Index ES 5 error for type "text"

**URL:** <https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045>\
**Category:** Elasticsearch\
**Created:** [November 24, 2016, 2:45am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045 "2016-11-24T02:45:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_she](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_she/32/48792_2.png) [@David\_she](https://discuss.elastic.co/u/David_she)\
**Post date:** [November 24, 2016, 2:45am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/1 "2016-11-24T02:45:13Z")

</div>

Hi,  
I'm trying to create an index using mappings and I get an error using a type text or keyword. It works with string of course but I want to use the new types in ES 5.

ERROR:

```
  { "error": { "root_cause": [{ "type": "mapper_parsing_exception", "reason": "No handler for type [text] declared on field [accessGroups]" } ], "type": "mapper_parsing_exception", "reason": "Failed to parse mapping [derived]: No handler for type [text] declared on field [accessGroups]", "caused_by": { "type": "mapper_parsing_exception", "reason": "No handler for type [text] declared on field [accessGroups]" } }, "status": 400}

```

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 24, 2016, 2:46am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/2 "2016-11-24T02:46:27Z")

</div>

What does the mapping look like?

---

<div class="post-metadata">

**Author:** ![David\_she](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_she/32/48792_2.png) [@David\_she](https://discuss.elastic.co/u/David_she)\
**Post date:** [November 24, 2016, 2:52am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/3 "2016-11-24T02:52:02Z")

</div>

{  
"settings" : {  
"number\_of\_shards" : 18,  
"number\_of\_replicas" : 5  
},  
"mappings":  
{  
"derived":  
{  
"properties":  
{  
"accessGroups":  
{  
"type": "text"  
}  
}  
}  
}  
}

Thanks

---

<div class="post-metadata">

**Author:** ![David\_she](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_she/32/48792_2.png) [@David\_she](https://discuss.elastic.co/u/David_she)\
**Post date:** [November 24, 2016, 2:59am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/4 "2016-11-24T02:59:15Z")

</div>

Obviously that was a cut down mappings but I tested with same results. Also the version if 5.0.0.  
Cheers

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 24, 2016, 4:33am UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/5 "2016-11-24T04:33:05Z")

</div>

I just tested on 5.0.1 and it worked fine;

```auto
PUT test
{
  "settings": {
    "number_of_shards": 18,
    "number_of_replicas": 5
  },
  "mappings": {
    "derived": {
      "properties": {
        "accessGroups": {
          "type": "text"
        }
      }
    }
  }
}

{
  "acknowledged": true,
  "shards_acknowledged": true
}

```

> [@David\_she](#):
>
> "number\_of\_shards" : 18,  
> "number\_of\_replicas" : 5

That seems pretty excessive

---

<div class="post-metadata">

**Author:** ![David\_she](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_she/32/48792_2.png) [@David\_she](https://discuss.elastic.co/u/David_she)\
**Post date:** [November 24, 2016, 9:36pm UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/6 "2016-11-24T21:36:28Z")

</div>

Thanks for your quick reply.  
shards and replication was for the whole schema, only part shown here, that will contain many objects and 500 million records.  
Found the error they had another instance on the same server using the default port. Our version 5 has a different port. Sorry to waste your time.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 24, 2016, 9:46pm UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/7 "2016-11-24T21:46:02Z")

</div>

> [@David\_she](#):
>
> shards and replication was for the whole schema, only part shown here, that will contain many objects and 500 million records.

That seems like an inadvisable way to approach things.

---

<div class="post-metadata">

**Author:** ![David\_she](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_she/32/48792_2.png) [@David\_she](https://discuss.elastic.co/u/David_she)\
**Post date:** [November 24, 2016, 10:52pm UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/8 "2016-11-24T22:52:06Z")

</div>

In what was unadvisable? We have 18 nodes and I thought best practice was 1 shard per node? Love to hear or read any advice  
Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 24, 2016, 10:52pm UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/9 "2016-11-24T22:52:46Z")

</div>

It depends on your data and use case really.

---

<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:** [December 22, 2016, 10:52pm UTC](https://discuss.elastic.co/t/creating-index-es-5-error-for-type-text/67045/10 "2016-12-22T22:52:59Z")

</div>

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