You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/07/08 14:08:11 UTC

[GitHub] [lucene] mocobeta opened a new pull request #207: LUCENE-9855: Rename nn search vector format

mocobeta opened a new pull request #207:
URL: https://github.com/apache/lucene/pull/207


   


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

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



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


[GitHub] [lucene] jpountz commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
jpountz commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-882303249


   Sounds good @mocobeta I'll merge shortly.
   
   A new question is whether `VectorSimilarityFunction` needs renaming now that it's been extracted out from `VectorValues`.


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

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



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


[GitHub] [lucene] jtibshirani commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
jtibshirani commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-878677846


   +1 to keeping the name `VectorValues`. Otherwise the changes look good to me too.
   
   One thought: I actually find the "Nn" prefix hard to read/ type, it almost looks like a typo. For me either "NN" or "Knn" (which is @msokolov's preferred option) would be more elegant. I really don't mean to nitpick, and understand it was difficult to reach a decision, so feel free to ignore this comment if you'd like :)
   
   


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

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



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


[GitHub] [lucene] mocobeta edited a comment on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta edited a comment on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-881549482


   Thanks @jpountz, I like the simpler `VectorValues` interface in #213.
   This and #213 could conflict with each other on some files I think, maybe I should wait until #213 is merged into main? By then, I'll revert `NnVectors` to `VectorValues`.


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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-883464749


   I opened #218 since I found that it's much easier than to revert previous commits and resolve the conflicts with the latest main here. Can you have a look at it?
   
   "Knn" vs. "Nn" - While both are fine for me, I noticed there are already several nearest-neighbor related classes/variables that have "knn" in their name (e.g. KnnGraphValues). For consistency and visibility, I used "Knn" this time.


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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-881549482


   Thanks @jpountz, I like the simpler `VectorValues` interface in #213.
   This and #213 could conflict with each other on some files I think, maybe I should wait #213 is merged into main? By then, I'll revert `NnVectors` to `VectorValues`.


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

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



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


[GitHub] [lucene] jpountz commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
jpountz commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-881325260


   Good point. I think having the similarity function on VectorValues is a bit awkward too since VectorValues is only about retrieving vectors. Maybe we should remove it from VectorValues?


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

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



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


[GitHub] [lucene] msokolov commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
msokolov commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r666474279



##########
File path: lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
##########
@@ -2284,28 +2284,28 @@ static void checkImpacts(Impacts impacts, int lastTarget) {
    *
    * @lucene.experimental
    */
-  public static Status.VectorValuesStatus testVectors(
+  public static Status.NnVectorsStatus testVectors(
       CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     if (infoStream != null) {
       infoStream.print("    test: vectors..............");

Review comment:
       should we change the text here? "nn vectors"?

##########
File path: lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
##########
@@ -2284,28 +2284,28 @@ static void checkImpacts(Impacts impacts, int lastTarget) {
    *
    * @lucene.experimental
    */
-  public static Status.VectorValuesStatus testVectors(
+  public static Status.NnVectorsStatus testVectors(
       CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     if (infoStream != null) {
       infoStream.print("    test: vectors..............");
     }
     long startNS = System.nanoTime();
     FieldInfos fieldInfos = reader.getFieldInfos();
-    Status.VectorValuesStatus status = new Status.VectorValuesStatus();
+    Status.NnVectorsStatus status = new Status.NnVectorsStatus();
     try {
 
-      if (fieldInfos.hasVectorValues()) {
+      if (fieldInfos.hasNnVectors()) {
         for (FieldInfo fieldInfo : fieldInfos) {
-          if (fieldInfo.hasVectorValues()) {
-            int dimension = fieldInfo.getVectorDimension();
+          if (fieldInfo.hasNnVectors()) {
+            int dimension = fieldInfo.getNnVectorDimension();
             if (dimension <= 0) {
               throw new RuntimeException(
                   "Field \""
                       + fieldInfo.name
                       + "\" has vector values but dimension is "

Review comment:
       "vector values" -> "nearest-neighbor vector values"?

##########
File path: lucene/core/src/java/org/apache/lucene/index/NnVectorsConsumer.java
##########
@@ -34,7 +34,7 @@
  *
  * @lucene.experimental
  */
-class VectorValuesWriter {
+class NnVectorsConsumer {

Review comment:
       +1 




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

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



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


[GitHub] [lucene] jpountz commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
jpountz commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-877865279


   > rename VectorValues to NnVectors - I chose shorter name here, but this could be "NnVectorValues"
   
   Maybe this one should not be renamed since it isn't related to nearest-neighbor search, it only allows iterating over vectors in doc ID order?


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

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



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


[GitHub] [lucene] mocobeta closed pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta closed pull request #207:
URL: https://github.com/apache/lucene/pull/207


   


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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-883474655


   > A new question is whether VectorSimilarityFunction needs renaming now that it's been extracted out from VectorValues.
   
   I'm fine with `VectorSimilarityFunction` and haven't come up with a more suitable name for it, let me know if there are any suggestions on the name.


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

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



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


[GitHub] [lucene] msokolov commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
msokolov commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r666468712



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90HnswVectorsReader.java
##########
@@ -247,12 +246,12 @@ public TopDocs search(String field, float[] target, int k, int fanout) throws IO
       return null;
     }
 
-    OffHeapVectorValues vectorValues = getOffHeapVectorValues(fieldEntry);
+    OffHeapNnVectors nnVectors = getOffHeapNnVectors(fieldEntry);
 
     // use a seed that is fixed for the index so we get reproducible results for the same query
     final Random random = new Random(checksumSeed);

Review comment:
       true, but annoying. I think we can safely ignore this. The intent is predictable-randomness. @sonatype-lift




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

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



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


[GitHub] [lucene] mocobeta commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r667338802



##########
File path: lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
##########
@@ -2284,28 +2284,28 @@ static void checkImpacts(Impacts impacts, int lastTarget) {
    *
    * @lucene.experimental
    */
-  public static Status.VectorValuesStatus testVectors(
+  public static Status.NnVectorsStatus testVectors(
       CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     if (infoStream != null) {
       infoStream.print("    test: vectors..............");

Review comment:
       Fixed in https://github.com/apache/lucene/pull/207/commits/4d301c580470a27993393ec50fef258040cfbe6c




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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-880628720


   > Maybe this one should not be renamed since it isn't related to nearest-neighbor search, it only allows iterating over vectors in doc ID order?
   
   `VectorValues` may be ok, but I think I'm not fully understand your point yet. Besides iterating "vector"s, `VectorValues` has `SimilarityFunction` enum that is a clear indication of nearest neighbour search to me. If we will decouple the vector value class from any search algorithm, should we factor out the enum into somewhere?
   It seems you all agree with that we should keep the name `VectorValues` and I don't have strong opinion about it, but would you help me to make things clear before reverting the 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@lucene.apache.org

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



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


[GitHub] [lucene] mocobeta edited a comment on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta edited a comment on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-880628720


   > Maybe this one should not be renamed since it isn't related to nearest-neighbor search, it only allows iterating over vectors in doc ID order?
   
   `VectorValues` may be ok, but I think I don't fully understand your point yet. Besides iterating "vector"s, `VectorValues` has `SimilarityFunction` enum that is a clear indication of nearest neighbour search to me. If we will decouple the vector value class from any search algorithm, should we factor out the enum into somewhere?
   It seems you all agree with that we should keep the name `VectorValues` and I don't have strong opinion about it, but would you help me to make things clear before reverting the 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@lucene.apache.org

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



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


[GitHub] [lucene] sonatype-lift[bot] commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r666468744



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90HnswVectorsReader.java
##########
@@ -247,12 +246,12 @@ public TopDocs search(String field, float[] target, int k, int fanout) throws IO
       return null;
     }
 
-    OffHeapVectorValues vectorValues = getOffHeapVectorValues(fieldEntry);
+    OffHeapNnVectors nnVectors = getOffHeapNnVectors(fieldEntry);
 
     // use a seed that is fixed for the index so we get reproducible results for the same query
     final Random random = new Random(checksumSeed);

Review comment:
       I've recorded this as ignored for this pull request. If you change your mind, just comment `@sonatype-lift unignore`.




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

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



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


[GitHub] [lucene] sonatype-lift[bot] commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r666280195



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90HnswVectorsReader.java
##########
@@ -247,12 +246,12 @@ public TopDocs search(String field, float[] target, int k, int fanout) throws IO
       return null;
     }
 
-    OffHeapVectorValues vectorValues = getOffHeapVectorValues(fieldEntry);
+    OffHeapNnVectors nnVectors = getOffHeapNnVectors(fieldEntry);
 
     // use a seed that is fixed for the index so we get reproducible results for the same query
     final Random random = new Random(checksumSeed);

Review comment:
       *PREDICTABLE_RANDOM:*  This random generator (java.util.Random) is predictable [(details)](https://find-sec-bugs.github.io/bugs.htm#PREDICTABLE_RANDOM)
   (at-me [in a reply](https://help.sonatype.com/lift) with `help` or `ignore`)




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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-876495952


   Most changes were done by IDE's refactoring function, besides I manually modified some comments/javadocs that were figured out by `git grep`.


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

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



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


[GitHub] [lucene] mocobeta commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r667339213



##########
File path: lucene/CHANGES.txt
##########
@@ -7,7 +7,7 @@ http://s.apache.org/luceneversions
 
 New Features
 
-* LUCENE-9322: Vector-valued fields, Lucene90 Codec (Mike Sokolov, Julie Tibshirani, Tomoko Uchida)
+* LUCENE-9322 LUCENE-9855: Vector-valued fields, Lucene90 Codec (Mike Sokolov, Julie Tibshirani, Tomoko Uchida)

Review comment:
       I think this can be grouped with LUCENE-9322?




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

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



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


[GitHub] [lucene] jpountz commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
jpountz commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-881343659


   I opened https://github.com/apache/lucene/pull/213 to remove `VectorValues#getSimilarityFunction`.


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

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



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


[GitHub] [lucene] msokolov commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
msokolov commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-879141625


   Re: `VectorValues`; I think we changed it to avoid possible confusion w/term vectors, but perhaps we are agreed that it is distnguished enough already. I'm fine keeping as is. re: Nn vs Knn :shrug: 


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

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



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


[GitHub] [lucene] mocobeta commented on pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on pull request #207:
URL: https://github.com/apache/lucene/pull/207#issuecomment-877639170


   Thanks @msokolov for reviewing. I'll wait for a few more days to let others give comments on this then merge it to the upstream if there is no another feedback.


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

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



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


[GitHub] [lucene] mocobeta commented on a change in pull request #207: LUCENE-9855: Rename nn search vector format

Posted by GitBox <gi...@apache.org>.
mocobeta commented on a change in pull request #207:
URL: https://github.com/apache/lucene/pull/207#discussion_r667338807



##########
File path: lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
##########
@@ -2284,28 +2284,28 @@ static void checkImpacts(Impacts impacts, int lastTarget) {
    *
    * @lucene.experimental
    */
-  public static Status.VectorValuesStatus testVectors(
+  public static Status.NnVectorsStatus testVectors(
       CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException {
     if (infoStream != null) {
       infoStream.print("    test: vectors..............");
     }
     long startNS = System.nanoTime();
     FieldInfos fieldInfos = reader.getFieldInfos();
-    Status.VectorValuesStatus status = new Status.VectorValuesStatus();
+    Status.NnVectorsStatus status = new Status.NnVectorsStatus();
     try {
 
-      if (fieldInfos.hasVectorValues()) {
+      if (fieldInfos.hasNnVectors()) {
         for (FieldInfo fieldInfo : fieldInfos) {
-          if (fieldInfo.hasVectorValues()) {
-            int dimension = fieldInfo.getVectorDimension();
+          if (fieldInfo.hasNnVectors()) {
+            int dimension = fieldInfo.getNnVectorDimension();
             if (dimension <= 0) {
               throw new RuntimeException(
                   "Field \""
                       + fieldInfo.name
                       + "\" has vector values but dimension is "

Review comment:
       Fixed in https://github.com/apache/lucene/pull/207/commits/4d301c580470a27993393ec50fef258040cfbe6c




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

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



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