I have a field mapping defined as
{"top_seller": {"Type": "logical"}}
In my query, I am trying to execute a custom evaluation query based on a boolean value. I pull my hair out. Every time I run a script, for example:
return if(doc['top_seller'].value==true) {10} else {0}
Each individual document receives 10 pulses. Only 1% of my documents are set to TRUE. I tried without == true, with == 'true'. I tried trinity .. Document ['top_seller'] value == true 10: 0. I tried 1/0 instead of true / false.
I even did an experiment in which I created a new index and type with the help of one true and one false document. In a match_all request, they both get promoted as if they have a true value.
source share