Error fields script in the Index Pattern

Hello.
I have an elastic version 7.10 and in the Index Pattern of one of the indexes I have created a simple fields script:
"doc['temperature']* 10"
Apparently the creation is correct, but I can't get to display the value of this field in a search or in Kibana.
Indicating me:

An error occurred when loading data.

Show details of error
Request error: search_phase_execution_exception, all shards failed

Can you tell me where the problem may be?

Why are you using version 7.10? It is very old and EOL. I would recommend upgrading.

It is not entirely clear to me what you have done, so it would help if you could show exactly what you have done, the request you are sending when you get the error and the full error message.

Hello.
I have created an index with the following structure:
{
"mappings": {
"properties": {
"timestamp": {
"type": "date"
},
"temperature": {
"type": "long"
},
"voltage": {
"type": "double"
},
"do not give": {
"type": "keyword"
},
"voltage_corrected": {
"type": "double",
"on_script_error": "fail",
"script": {
"source": "emit(doc['voltage'].value * params['multiplier'])",
"params": {
multiplier: 4
} }}}}}
The index has been created successfully and I have inserted 7 documents:
Status: open
Document Count:7
But the voltage_corrected field from Discover or Dashboard is not available to me.
The Number type fields that appear are:
_score
mappings.properties.voltage_corrected.script.params.multiplier
timestamp
voltage

but not "voltage_corrected"

I understand that the script is wrong, right?

Where did you find that in the docs?

Can you please show the mappings that were actually applied to the index you created?

It looks a bit like a runtime field, which was introduced in a later version. If you want to use runtime fields I would recommend you upgrade to at least version 7.17.

You have been able to specify scripted fields in Kibana for a while, but that is a Kibana internal construct that only works within Kibana and is not available in mappings or for external direct queries to Elasticsearch. You can get the same effect by using script query clauses but you have to include this in your queries and can not store these in mapping. This is what runtinme fields add in newer versions.

OK Christian, let's see if we can solve it with the version update.
Thanks