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 2022/02/11 17:02:47 UTC

[GitHub] [lucene] msokolov commented on a change in pull request #676: Lucene-10176: Remove VectorValues#size()

msokolov commented on a change in pull request #676:
URL: https://github.com/apache/lucene/pull/676#discussion_r804842543



##########
File path: lucene/core/src/java/org/apache/lucene/index/VectorValues.java
##########
@@ -38,15 +38,6 @@ protected VectorValues() {}
   /** Return the dimension of the vectors */
   public abstract int dimension();
 
-  /**
-   * TODO: should we use cost() for this? We rely on its always being exactly the number of
-   * documents having a value for this field, which is not guaranteed by the cost() contract, but in
-   * all the implementations so far they are the same.
-   *
-   * @return the number of vectors returned by this iterator
-   */
-  public abstract int size();

Review comment:
       If we're going to do this, then we need some way of enforcing that `cost()` is accurate. At the very minimum a unit testing strategy. Perhaps in `AssertingKnnVectorsFormat` we could assert that.




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