Root mapping definition has unsupported parameters


(Florin Andrei) #1

ES 2.2.0

I get this error:

# curl -XPUT http://localhost:9200/vendnext_new_no_auth_index/ -d @./vendnext_new_no_auth_index.config.json
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [search_analyzer : search_ngram] [index_analyzer : index_ngram]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [vendnext_new_no_auth_type]: Root mapping definition has unsupported parameters:  [search_analyzer : search_ngram] [index_analyzer : index_ngram]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [search_analyzer : search_ngram] [index_analyzer : index_ngram]"}},"status":400}

With this schema:

{
  "mappings": {
    "vendnext_new_no_auth_type":{
      "index_analyzer": "index_ngram",
      "search_analyzer": "search_ngram",
     "properties": {
       "userStatus":{
         "type" : "nested",
         "include_in_parent": true,
         "properties": {
            "underWatch" : {"type": "boolean" },
            "provisional"  : {"type": "boolean" },
            "suspended"  : {"type": "boolean" },
            "deactivated"  : {"type": "boolean" }
          }
       },"deviceStatus":{
         "type" : "nested",
         "include_in_parent": true,
         "properties": {
            "underWatch" : {"type": "boolean" },
            "offLocation"  : {"type": "boolean" },
            "ignore"  : {"type": "boolean" },
            "snoozeUntil"  : {"type": "boolean" }
          }
       },"vms":{
         "type": "nested",
         "include_in_parent": true,
         "properties": {
           "vagabond":{"type":"boolean"},
           "parlevel":{"type":"boolean"}
         }
       }
     }
    }
  },
  "settings": {
    "analysis": {
      "filter": {
        "ngram_filter":{
          "type":"ngram",
          "min_gram":3,
          "max_gram":35
        }
      },
      "analyzer": {
        "index_ngram":{
          "type": "custom",
          "tokenizer": "uax_url_email",
          "filter": ["ngram_filter","lowercase"]
        },
        "search_ngram":{
          "type": "custom",
          "tokenizer": "uax_url_email",
          "filter": "lowercase"
        }
      }
    }
  }
}

Any way to avoid this? Thanks.


(system) #2