I think there is a maximum now.
When I upgraded to ES V5.0, I got messages of the form:
id is too long, must be no longer than 512 bytes but was 1010
and a google search found this file:
with this requirement:
if (id != null && id.getBytes(StandardCharsets.UTF_8).length > 512) {
validationException = addValidationError("id is too long, must be no longer than 512 bytes but was: " +
id.getBytes(StandardCharsets.UTF_8).length, validationException);
}