Error when using filter with scripted field "Error executing Painless script"

I have created a script field that converts bytes to kb, mb, etc.

The script is

doc[‘bytes’].value / 1

Field type - number,
Format - bytes.
This works great in the sense that I can see the field and its correct value when detected. But when I try to apply a filter like test: greater than 100MB, I get the following error


What do I need to do for this to work?
Thanks in advance.

It seems you are missing a period before lte(() →
i could only get that from the script you shared.

I do not have “lte (() →”. I am attaching screenshots with the script and its result