Mapper Parsing exception Root mapping definition has unsupported parameters


(Naveen Jaini) #1

Hi,

I am trying to create an index with autocomplete support successfully but I am unable to add data into it.
Please help me on this, I stuck on this error from last 48hrs.

Please look at the attachment for the settings

PUT http://localhost:9200/my_index/_mapping/users/
Input
{
"userId": "2",
"userFirstName": "m4",
"userLastName": "m4",
"userMobile": "40475341",
"userEmail": "test@gmail.com",
"userSpecialization": "1:3",
"userCityId": "6",
"userCityName":"Hyderabad"
}
Output:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [userId : 2] [userFirstName : m4] [userLastName : m4] [userMobile : 40475341] [userEmail : test@gmail.com] [userSpecialization : 1:3] [userCityId : 6] [userCityName : Hyderabad]"
}
],
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [userId : 2] [userFirstName : m4] [userLastName : m4] [userMobile : 40475341] [userEmail : test@gmail.com] [userSpecialization : 1:3] [userCityId : 6] [userCityName : Hyderabad]"
},
"status": 400
}

Settings:
{
"my_index": {
"aliases": {

    },
    "mappings": {
      "practices": {
        "_all": {
          "analyzer": "nGram_analyzer",
          "search_analyzer": "whitespace_analyzer"
        },
        "properties": {
          "practiceCity": {
            "type": "string",
            "index":"analyzed"
          },
          "practiceId": {
            "type": "long",
            "index":"not_analyzed"
          },
          "practiceName": {
            "type": "string",
            "boost": 10,
            "index":"analyzed"
          },
          "practicePhone": {
            "type": "long",
            "boost": 10,
            "index":"analyzed"
          },
          "practiceService": {
            "type": "string",
            "boost": 5,
            "index":"not_analyzed"
          }
        }
      },
      "users": {
        "_all": {
          "analyzer": "nGram_analyzer",
          "search_analyzer": "whitespace_analyzer"
        },
        "properties": {
          "userCityId": {
            "type": "long",
            "index":"not_analyzed"
          },
          "userCityName": {
            "type": "string",
            "index":"not_analyzed"
          },
          "userEmail": {
            "type": "string",
            "index":"analyzed"
          },
          "userFirstName": {
            "type": "string",
            "boost": 10,
            "index":"analyzed"
          },
          "userId": {
            "type": "long"
          },
          "userLastName": {
            "type": "string",
            "boost": 10,
            "index":"not_analyzed"
          },
          "userMobile": {
            "type": "string",
            "index":"analyzed"
          },
          "userSpecialization": {
            "type": "string",
            "boost": 5,
            "index":"not_analyzed"
          }
        }
      }
    },
    "settings": {
      "index": {
        "analysis": {
          "filter": {
            "nGram_filter": {
              "max_gram": "20",
              "type": "nGram",
              "min_gram": "3",
              "token_chars": [
                "letter",
                "digit",
                "punctuation",
                "symbol"
              ]
            }
          },
          "analyzer": {
            "nGram_analyzer": {
              "type": "custom",
              "filter": [
                "lowercase",
                "asciifolding",
                "nGram_filter"
              ],
              "tokenizer": "whitespace"
            },
            "whitespace_analyzer": {
              "type": "custom",
              "filter": [
                "lowercase",
                "asciifolding"
              ],
              "tokenizer": "whitespace"
            }
          }
        },
        "number_of_replicas": "1",
        "number_of_shards": "5"
      }
    }
  }
}

(system) #2

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