uschindler commented on code in PR #12436:
URL: https://github.com/apache/lucene/pull/12436#discussion_r1276161543
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene95/Lucene95HnswVectorsFormat.java:
##########
@@ -185,6 +188,11 @@ public KnnVectorsReader fieldsReader(SegmentReadState
state) throws IOException
return new Lucene95HnswVectorsReader(state);
}
+ @Override
+ public int getMaxDimensions(String fieldName) {
+ return MAX_DIMENSIONS;
+ }
Review Comment:
In my opinion, there is duplicate information:
- The `DEFAULT_MAX_DIMENSIONS` in the abstract base class if fine as
*public* constant. It should be returned by the default implementation.
- The default impl in base class should maybe only be in 9.x. In main branch
(10.x) maybe the default impl should go away and getting abstract.
- the `Lucene95HnswVectorsFormat#MAX_DIMENSIONS`` constant should simply
return 1024 without a constant. I tend to make this explicit, because if we
change the default in base class later, the HNSW codec should keep its own
limit.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]