Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.
In this case, you're trying to access a negative indexed element from the ArrayList.
Solutions on the web
via lucene-java-user by Matthew Petersen, 1 year ago