Hello Elastic Community,
when creating a value boost on a number field via the appsearch ui in kibana, the value is interpreted as string and won´t boost any document.
as you can see in the search settings the created value boost contains 1 as a string
"boosts": {
"type": [
{
"type": "value",
"factor": 10,
"value": [
"1"
]
}
]
},
following script will be generated, which obviously wont work for a float field, when comparing "1" as a string to a float.
{
"script_score": {
"script": {
"source": "Math.max(_score + (((doc.containsKey(\"type.float\") && !doc[\"type.float\"].empty && ((doc[\"type.float\"].length > 1) ? new HashSet(doc[\"type.float\"]).removeAll([\"1\"]) : [\"1\"].contains(doc[\"type.float\"].value))) ? 10.0 : 0)) - _score, 0)"
}
}
}
When creating the boost via the api the value is interpreted as float and the boosting works then. Is there a way to escape the value boost for numbers, so it is interpreted as float in the UI or is this a bug?