You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2023/01/05 09:01:06 UTC

[GitHub] [solr] henrik242 commented on a diff in pull request #1255: SOLR-16588: set default knn algorithm

henrik242 commented on code in PR #1255:
URL: https://github.com/apache/solr/pull/1255#discussion_r1062245190


##########
solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java:
##########
@@ -124,18 +124,18 @@ public KnnVectorsFormat getKnnVectorsFormatForField(String field) {
             if (fieldType instanceof DenseVectorField) {
               DenseVectorField vectorType = (DenseVectorField) fieldType;
               String knnAlgorithm = vectorType.getKnnAlgorithm();
-              if (knnAlgorithm != null) {
-                if (knnAlgorithm.equals(DenseVectorField.HNSW_ALGORITHM)) {
-                  int maxConn = vectorType.getHnswMaxConn();
-                  int beamWidth = vectorType.getHnswBeamWidth();
-                  return new Lucene94HnswVectorsFormat(maxConn, beamWidth);
-                }
+              if (DenseVectorField.HNSW_ALGORITHM.equals(knnAlgorithm)) {
+                int maxConn = vectorType.getHnswMaxConn();
+                int beamWidth = vectorType.getHnswBeamWidth();
+                return new Lucene94HnswVectorsFormat(maxConn, beamWidth);

Review Comment:
   With regards to including this in Solr: 9.1.1:  Doesn't `Lucene94HnswVectorsFormat` require Lucene 9.4?  9.1.1 will stay on Lucene 9.3 afaik.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org