jpountz commented on code in PR #12436:
URL: https://github.com/apache/lucene/pull/12436#discussion_r1269145583


##########
lucene/core/src/java/org/apache/lucene/index/IndexingChain.java:
##########
@@ -621,6 +621,12 @@ private void initializeFieldInfo(PerField pf) throws 
IOException {
       final Sort indexSort = indexWriterConfig.getIndexSort();
       validateIndexSortDVType(indexSort, pf.fieldName, s.docValuesType);
     }
+    if (s.vectorDimension != 0) {
+      validateMaxVectorDimension(
+          pf.fieldName,
+          s.vectorDimension,
+          indexWriterConfig.getCodec().knnVectorsFormat().getMaxDimensions());
+    }

Review Comment:
   This is probably not going to do what we want when a 
`PerFieldKnnVectorsFormat` is used, as this would check the limit on 
`PerFieldKnnVectorsFormat`, rather than on the actual format that is used for 
`pf.fieldName`. Maybe `getMaxDimensions` should be on `KnnVectorsWriter` and we 
could forward to `pf.knnVectorsWrtier` here for checking?



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

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

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

Reply via email to