在es5.5中,如何确定字段是否为数字?
if (is_numeric(ctx._source.some)) {
ctx._source.some = ctx._source.some + 2
}
instanceof运营商可能会在这方面提供帮助
if (ctx._source.some instanceof byte ||
ctx._source.some instanceof short ||
ctx._source.some instanceof int ||
ctx._source.some instanceof long ||
ctx._source.some instanceof float ||
ctx._source.some instanceof double)
{
ctx._source.some = ctx._source.some + 2
}