| I know for a fact that:
- Elasticsearch may hold more than Integer.MAX_VALUE documents in one index, due to sharding (each shard is one Lucene index)
- Elasticsearch expects integers for the limit and offset (bug?)
- Lucene only ever works with integers
I don't know how Elasticsearch behaves when returning a hit count greater than Integer.MAX_VALUE; maybe it fails due to an overflow. We should define the expected behavior for these APIs and add tests, because we currently only ever test with default values and very small values. |