mayya-sharipova commented on a change in pull request #11: URL: https://github.com/apache/lucene/pull/11#discussion_r596378537
########## File path: lucene/core/src/java/org/apache/lucene/index/FieldInfo.java ########## @@ -130,127 +167,252 @@ public boolean checkConsistency() { } } - if (pointDimensionCount < 0) { + if (docValuesType == null) { + throw new IllegalStateException("DocValuesType must not be null (field: '" + name + "')"); + } + if (dvGen != -1 && docValuesType == DocValuesType.NONE) { throw new IllegalStateException( - "pointDimensionCount must be >= 0; got " + pointDimensionCount); + "field '" + + name + + "' cannot have a docvalues update generation without having docvalues"); } + if (pointDimensionCount < 0) { + throw new IllegalStateException( + "pointDimensionCount must be >= 0; got " + + pointDimensionCount + + " (field: '" + + name + + "')"); + } if (pointIndexDimensionCount < 0) { throw new IllegalStateException( - "pointIndexDimensionCount must be >= 0; got " + pointIndexDimensionCount); Review comment: Unfortunately I can't do much with formatting. This is how ./gradlew :lucene:core:spotlessApply reformats the code. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org