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

thx,
_f

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0db9a4c6-426f-4ba6-bd67-0d6431322f4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.