Hi,
1: I try to create an index in command line with succes without scripted fields
PUT /my_index_test
{
"settings" : {
"number_of_shards" : 1
},
"mappings": {
"core2": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"@version": {
"type": "string"
},
"Available_Capacity_%": {
"type": "double"
},
"Available_Capacity_gb": {
"type": "double"
},
"BATIMENT": {
"type": "string"
},
"CENTERA": {
"type": "string"
},
"DATE": {
"type": "string"
},
"DATEXM": {
"type": "string"
},
"Free_Object_Count_%": {
"type": "double"
},
"Free_Object_Count_nb": {
"type": "double"
},
"Free_Raw_Capacity_%": {
"type": "double"
},
"Free_Raw_Capacity_gb": {
"type": "double"
},
"MONDE": {
"type": "string"
},
"Name": {
"type": "string"
},
"ROLE": {
"type": "string"
},
"prediction": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
Now I try to add the scripted_fields, I try to add this line before the mapping section, but without success
"script_fields" : {
"UsedRawLimit": {
"script" : "0.8"
},
"UsedObjectLimit": {
"script" : "0.8"
}
},
I don't have error
{
"acknowledged": true
}
but, when I go in Settings>Indices web page of Kibana, I create the new indice, and scripted_fields don't appears.
How can I do that ?
2: For some reason, I need to change the format of a "Type". For example:
How can I custumize it in command line ?
Thanks!