kotman12 commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3363424169


##########
solr/core/src/java/org/apache/solr/core/SolrFlatVectorFormat.java:
##########
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.core;
+
+import java.io.IOException;
+import org.apache.lucene.codecs.KnnVectorsFormat;
+import org.apache.lucene.codecs.KnnVectorsReader;
+import org.apache.lucene.codecs.KnnVectorsWriter;
+import org.apache.lucene.codecs.hnsw.FlatVectorScorerUtil;
+import org.apache.lucene.codecs.lucene99.Lucene99FlatVectorsFormat;
+import org.apache.lucene.index.SegmentReadState;
+import org.apache.lucene.index.SegmentWriteState;
+
+/**
+ * SPI-registered wrapper for {@link Lucene99FlatVectorsFormat}, which Lucene 
does not register as a
+ * {@link KnnVectorsFormat} in SPI.
+ *
+ * @lucene.spi {@value #NAME}
+ * @since 10.1
+ */
+public final class SolrFlatVectorFormat extends KnnVectorsFormat {

Review Comment:
   I see now why we need this wrapper. But is it _really_ a "Solr Flat Vector" 
format? I feel it is a bit of a stretch to call it that as the implementation 
is entirely Lucene and this is just to work around exposing it as an SPI. I 
suppose you can change the Lucene implementation under the hood without 
changing this "Solr format" but then you lose the benefit of the naming which 
is to immediately know that you have, say, lucene flat vector files from two 
different versions just by looking at the index files. 



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

Reply via email to