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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s