Anyzm
(Anyzm)
May 9, 2021, 7:56am
1
i create the index:
PUT mobile_info/?pretty
{
"settings": {
"number_of_shards": 5,
"number_of_replicas": 1
},
"mappings": {
"info": {
"_routing":{
"required":"true"
},
"properties": {
"cust_no": {
"type": "keyword"
}
}
}
}
}
but i want to change the _routing.required field to false,how to change it?
Anyzm
(Anyzm)
May 9, 2021, 8:07am
2
i try to request :
POST mobile_info/info/_mapping
{"_routing":{"required":false}}
there is no error ,response with {"acknowledged":true} ,howerver it dosen't work!!
warkolm
(Mark Walkom)
May 10, 2021, 12:22am
3
Please format your code/logs/config using the </>
button, or markdown style back ticks. It helps to make things easy to read which helps us help you
What version are you on? I just tried your first PUT
and got;
{
"error" : {
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "Root mapping definition has unsupported parameters: [info : {_routing={required=true}, properties={cust_no={type=keyword}}}]"
}
],
"type" : "mapper_parsing_exception",
"reason" : "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [info : {_routing={required=true}, properties={cust_no={type=keyword}}}]",
"caused_by" : {
"type" : "mapper_parsing_exception",
"reason" : "Root mapping definition has unsupported parameters: [info : {_routing={required=true}, properties={cust_no={type=keyword}}}]"
}
},
"status" : 400
}
Anyzm
(Anyzm)
May 10, 2021, 2:28am
4
thanks, my ES version is 6.6.0。
So is there no way to change mappings._routing.required this field?
system
(system)
Closed
June 7, 2021, 2:28am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.