Creating Index ES 5 error for type "text"


(David She) #1

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


(Mark Walkom) #2

What does the mapping look like?


(David She) #3

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

Thanks


(David She) #4

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


(Mark Walkom) #5

I just tested on 5.0.1 and it worked fine;

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

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

That seems pretty excessive


(David She) #6

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.


(Mark Walkom) #7

That seems like an inadvisable way to approach things.


(David She) #8

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


(Mark Walkom) #9

It depends on your data and use case really.


(system) #10

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