PUT hello-apple
PUT hello-apple/_mapping
{
"properties": {
"f1": {
"type": "text"
}
},
"runtime": {
"f1": {
"type": "keyword",
"script": {
"source": "emit(doc['f1.keyword'].value)"
}
}
}
}
POST hello-apple/_doc/1
{
"f1" : "text"
}
GET hello-apple/_search