This can be useful for dealing with exclusive bounds.
Here is a patch. It also adds MIN_VALUE/MAX_VALUE constants if consumers of these methods want to do something else than propagating the exception in case of underflow or overflow.
Looks good. In most cases overflow/underflow is ArithmeticException, maybe we want it instead of IAE. Should we mention it from the newRangeQuery docs in case someone wants to do this?
Here is a new patch. I added the suggested javadocs and replaced the IAE with an ArithmeticException.
Commit 0ee2319866a3ec52a22d7c9ad15f90f4a07efeb6 in lucene-solr's branch refs/heads/branch_6x from Adrien Grand
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0ee2319 ]
LUCENE-7234: Add InetAddressPoint.nextUp/nextDown
Commit 91fd163112b9a433d3e1f578d5c8a9cfbd9dce2f in lucene-solr's branch refs/heads/master from Adrien Grand
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=91fd163 ]
Manually correcting fixVersion per Step #S5 of LUCENE-7271