Test support for longs in hit counts, limits and offsets more thoroughly

Description

I know for a fact that:

  1. Elasticsearch may hold more than Integer.MAX_VALUE documents in one index, due to sharding (each shard is one Lucene index)

  2. Elasticsearch expects integers for the limit and offset (bug?)

  3. 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.

While we’re at it, let’s test the default value for limits more thoroughly: Elasticsearch has a default of 10 or so, and I don’t think we override it properly. => Fixed in

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Priority

Major
Configure