I have over 4 billion documents I'm trying to facet over and I'm hitting a
int overflow with a terms facet. I'm faceting over multiple indexes and
shards, so the overflow only happens when the result is combined.
I tried using the terms_stats, since internally it uses a long, but that is
4x slower and requires either I use a random value field or use a
value_script (I tried value_script:"1") which is even slower (10x)
It looks like the code wouldn't be hard to change to use a long, maybe
still using a int on the wire to not break compatibility and since I won't
have more then max int per shard. Would such a pull request be acceptable?
Or should I look into writing a custom facet plugin?