Map a value to a boolean at indexing time in ElasticSearch -
i json object string field has 2 values of "yes" or "no".
is possible define mapping maps "yes" "true" , "no" "false"?
what if values not yes/no 2 other strings, such "yep" , "nope"?
yes use case in op, documentation :
the boolean type supports passing value number or string (in case 0, empty string, false, off , no false, other values true).
so "no" map false , "yes" map true , need specify field of type "boolean" in mapping.
Comments
Post a Comment