MVEL script and checks on boolean type fields

hola everybody,

i have a field in my mapping like
"some_flag" : {
"type" : "boolean",
"store" : "yes"

and i want to give bias to results that have the flag set to false. first i
ran into the issue that apparently the field is treated as a string (was
getting type errors)

then it at least executed, but i cant find out how the booleans are
represented as strings. i had found some stack overflow entry that
suggested that internally it's represented as 'T' and 'F' due to the way
the JSON is interpreted but

(doc['some_flag']=='T') ? 1 : 2;

does not work either.

What's the trick I am missing?

elasticsearch version: 1.3.1


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit