Upgrade from 2.1.1 to 2.2 - Error while creating mapping


(gary) #1

I got the mapping from an existing elastic search cluster on version 2.1.1 and trying to create the same mapping on an elastic search cluster running version 2.2. I get the following error -

{
   "error": {
      "root_cause": [
         {
            "type": "mapper_parsing_exception",
            "reason": "Root mapping definition has unsupported parameters:  [mappings : {blog={properties={siteId={type=long}, siteLocationId={type=long}, siteName={type=string, index=not_analyzed}, siteNumber={type=long}, city={type=string, index=not_analyzed}, comments={type=string, fields={not_analysed={type=string, index=not_analyzed}}}, blogDate={type=date, format=strict_date_optional_time||epoch_millis}, blogId={type=long}, blogRating={type=double}, blogSourceAliases={type=string, index=not_analyzed}, blogSourceIds={type=long}, blogSourceNames={type=string, index=not_analyzed}, blogerFirstName={type=string}, blogerId={type=long}, blogerLastName={type=string}, blogerNickName={type=string, index=not_analyzed}, state={type=string, index=not_analyzed}, zip={type=string, index=not_analyzed}}}}]"
         }
      ],
      "type": "mapper_parsing_exception",
      "reason": "Root mapping definition has unsupported parameters:  [mappings : {blog={properties={siteId={type=long}, siteLocationId={type=long}, siteName={type=string, index=not_analyzed}, siteNumber={type=long}, city={type=string, index=not_analyzed}, comments={type=string, fields={not_analysed={type=string, index=not_analyzed}}}, blogDate={type=date, format=strict_date_optional_time||epoch_millis}, blogId={type=long}, blogRating={type=double}, blogSourceAliases={type=string, index=not_analyzed}, blogSourceIds={type=long}, blogSourceNames={type=string, index=not_analyzed}, blogerFirstName={type=string}, blogerId={type=long}, blogerLastName={type=string}, blogerNickName={type=string, index=not_analyzed}, state={type=string, index=not_analyzed}, zip={type=string, index=not_analyzed}}}}]"
   },
   "status": 400
}

(Mark Walkom) #2

Can we see the mapping, properly formatted?


(gary) #3

The mapping is shown below. Thanks in advance for taking a look.

"mappings":{  
   "blog":{  
      "properties":{  
         "siteId":{  
            "type":"long"
         },
         "siteLocationId":{  
            "type":"long"
         },
         "siteName":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "siteNumber":{  
            "type":"long"
         },
         "city":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "comments":{  
            "type":"string",
            "fields":{  
               "not_analysed":{  
                  "type":"string",
                  "index":"not_analyzed"
               }
            }
         },
         "blogDate":{  
            "type":"date",
            "format":"strict_date_optional_time||epoch_millis"
         },
         "blogId":{  
            "type":"long"
         },
         "blogRating":{  
            "type":"double"
         },
         "blogSourceAliases":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "blogSourceIds":{  
            "type":"long"
         },
         "blogSourceNames":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "blogerFirstName":{  
            "type":"string"
         },
         "blogerId":{  
            "type":"long"
         },
         "blogerLastName":{  
            "type":"string"
         },
         "blogerNickName":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "state":{  
            "type":"string",
            "index":"not_analyzed"
         },
         "zip":{  
            "type":"string",
            "index":"not_analyzed"
         }
      }
   }

(David Pilato) #4

How do you send it to elasticsearch?


(gary) #5

I am using Sense chrome extension to send this request.

PUT indexName
JSON body


(system) #6