ElasticSearch 5: MapperParserException with multi_field

后端 未结 1 1173
情书的邮戳
情书的邮戳 2021-01-12 02:31

This mapping hast worked with ES 2.X, now with ES 5 I get an exception:

{  
\"type1\":{  
    \"properties\":{  
        \"name\":{  
            \"type\":\"         


        
相关标签:
1条回答
  • 2021-01-12 03:01

    multi-field was deprecated in ES 1.x and completely removed in ES 5.x.

    Now multi fields are supported via the use of fields which you can specify like this:

    {  
      "type1":{  
        "properties":{  
            "name":{  
                "type":"text",
                "analyzer":"standard",
                "index":"analyzed",
                "store":"no",
                "search_analyzer":"standard"
                "fields": {
                    "autocomplete":{  
                        "type":"text",
                        "analyzer":"autocomplete",
                        "index":"analyzed",
                        "store":"no",
                        "search_analyzer":"standard"
                    }
                }
            }
        }
      }
    }
    
    0 讨论(0)
提交回复
热议问题