Categories
Microblog

Elasticsearch += doesn’t work for large values

For some reason in Elasticsearch’s “painless” scripting language the += operator only works for values less than 2^32. Kinda sad given that I’m using it on a long that should support up to 2^64.

Instead, you need to use value = value + 1, which works.

By Kyle Piira

I'm a computer science student at the University of Massachusetts and the founder of the Hoxly Corporation.

Leave a Reply

Your email address will not be published. Required fields are marked *