You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "adamjq (via GitHub)" <gi...@apache.org> on 2026/06/01 19:28:43 UTC

[PR] SOLR-18267: Add flat vector index with no HNSW [solr]

adamjq opened a new pull request, #4492:
URL: https://github.com/apache/solr/pull/4492

   https://issues.apache.org/jira/browse/SOLR-18267
   
   # Description
   
   There are certain use cases, such as highly selective filters on large datasets, where it can be more efficient to perform a brute-force KNN search as a post-filter, instead of during ANN search.
   
   Solr currently supports this use case with the [vectorSimilarity Function](https://solr.apache.org/guide/solr/latest/query-guide/function-queries.html#vectorsimilarity-function) and an `fq`, but still requires an HNSW graph to be built during indexing when using DenseVectorField, even if it's not used during search. The goal of this feature is to avoid paying the cost of HNSW graph construction and rebuilding ingestion when ANN search isn't used.
   
   # Solution
   
   This PR introduces a new `knnAlgorithm=flat` option to DenseVectorField that uses [Lucene99FlatVectorsFormat](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsFormat.java). This stores vectors in the index (.vec/.vemf files) without building the HNSW graph (.vex/.vem files).
   
    `Lucene99FlatVectorsFormat` is not registered in Lucene's SPI, so this PR includes a wrapper class SolrFlatVectorFormat that delegates to Lucene99FlatVectorsFormat as a workaround. There are examples in other Lucene-based engines using a similar pattern to provide a flat vector format for exact KNN search that wraps Lucene99FlatVectorsFormat.
   
   ## Limitations
   
   This PR currently doesn't support:
   - `knnAlgorithm=flat` for quantized variants
   - search across flat dense vector fields using the `knn` query parser. Only vectorSimilarity is initially supported.
   
   Both features could be shipped as follow-ups.
   
   AI Disclosure: Claude was used to assist with this PR. All code has been reviewed and tested by me.
   
   # Tests
   
   Unit tests for Dense Vector Fields and quantized variants.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [X] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability.
   - [X] I have created a Jira issue and added the issue ID to my pull request title.
   - [X] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
   - [X] I have developed this patch against the `main` branch.
   - [X] I have run `./gradlew check`.
   - [X] I have added tests for my changes.
   - [X] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   - [X] I have added a [changelog entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my change
   


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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "alessandrobenedetti (via GitHub)" <gi...@apache.org>.
alessandrobenedetti commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3347693109


##########
solr/core/src/test-files/solr/collection1/conf/bad-schema-densevector-flat-bq.xml:
##########


Review Comment:
   let's be explciit in the names where possible:
   
   bq=binaryQuantized



##########
solr/core/src/java/org/apache/solr/schema/DenseVectorField.java:
##########
@@ -471,6 +473,9 @@ public DenseVectorParser getVectorBuilder(
   }
 
   public KnnVectorsFormat buildKnnVectorsFormat() {
+    if (FLAT_ALGORITHM.equals(knnAlgorithm)) {
+      return new SolrFlatVectorFormat();
+    }

Review Comment:
   Probably better readability with if else



##########
solr/core/src/test-files/solr/collection1/conf/bad-schema-densevector-flat-sq.xml:
##########


Review Comment:
   same here, scalar quantized



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "adamjq (via GitHub)" <gi...@apache.org>.
adamjq commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3349901282


##########
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 went back-and-forth about the naming of this class, because it is used as the name of segment files. For example: `_0_SolrFlatVectorFormat_0.vec` and `_0_SolrFlatVectorFormat_0.vemf`. Since the name is baked into the index, versioning it might make it easier to evolve in the future.
   
   An alternative would be to add a version in the name like `Solr101FlatVectorFormat` (indicating it was introduced in Solr 10.1), or a similar approach. 
   
   @alessandrobenedetti do you have a strong opinion about either approach?



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "kotman12 (via GitHub)" <gi...@apache.org>.
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.~
   
   Edit: I don't think you _can_ actually hot swap another Lucene implementation here otherwise you won't know how to read the old index files if you ever upgrade, right? This makes me think versioning is the way to go otherwise the unversioned `SolrVectorFormat` will forever be tied to Lucene99 format and any iteration will be versioned and that will be confusing to look at. So we should version it from the start.



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "alessandrobenedetti (via GitHub)" <gi...@apache.org>.
alessandrobenedetti commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3361038296


##########
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:
   mmmm I never liked the versioning in the name of the class, to be honest, let's see if anybody has any suggestions and let's take it from there!



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "kotman12 (via GitHub)" <gi...@apache.org>.
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.~
   
   Edit: I don't think you _can_ actually hot swap another Lucene implementation here otherwise you won't know how to read the old index files if you ever upgrade, right?



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "adamjq (via GitHub)" <gi...@apache.org>.
adamjq commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3364511001


##########
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 agree that having a version from the start is a good idea given the potential for this to evolve in the future. The question would be should be it the Solr version (e.g. `Solr101FlatVectorFormat` for Solr 10.1), or the Lucene Version (e.g. `SolrLucene99FlatVectorsFormat`). 
   
   The class is currently a very thin wrapper that delegates to the Lucene version. However, I could see the need to extend functionality to support the KNN query parser search logic. It's looks like Elastic had [a similar discussion in this thread](https://github.com/elastic/elasticsearch/pull/104872#discussion_r1474602654), so there's precedent there.
   
   I've updated the PR to use `Solr101FlatVectorFormat` but am open to changing it



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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "kotman12 (via GitHub)" <gi...@apache.org>.
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: 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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "alessandrobenedetti (via GitHub)" <gi...@apache.org>.
alessandrobenedetti merged PR #4492:
URL: https://github.com/apache/solr/pull/4492


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


Re: [PR] SOLR-18267: Add flat vector index with no HNSW [solr]

Posted by "kotman12 (via GitHub)" <gi...@apache.org>.
kotman12 commented on code in PR #4492:
URL: https://github.com/apache/solr/pull/4492#discussion_r3363331450


##########
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 would name it something to indicate the _Lucene's_ version and codec. There doesn't seem to be any consistent convention here. Some codecs don't embed versions in their file names but some do. When they do it is typically the Lucene version that is embedded. I don't see a huge downside to having the codec/Lucene version displayed more prominently when inspecting index files. For reference, the vector codecs do seem to have more descriptive file names so I am leaning towards that naming pattern for consistency:
   
   ```
   *_Lucene99HnswVectorsFormat_0.vec
   *_Lucene99HnswVectorsFormat_0.vem
   ```



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