Elasticsearch - Advanced Patterns
You wrote this runtime field script:
But the query fails with an error:
{
"runtime_mappings": {
"discounted_price": {
"type": "double",
"script": {
"source": "emit(doc['price'].value * 0.9)"
}
}
}
}But the query fails with an error:
Field [price] not found in doc. What is the likely cause?