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/14 00:35:34 UTC

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

spike-liu commented on a change in pull request #676:
URL: https://github.com/apache/lucene/pull/676#discussion_r805441501



##########
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:
       Thanks for your review, Michael.
   
   It seems the contract of cost() indicates inaccuracy. Or maybe we could add an accurate contract within VectorValues.java for cost()?
   
   /**
   
   Returns the estimated cost of this {https://github.com/link DocIdSetIterator}.
   This is generally an upper bound of the number of documents this iterator might match, but
   
   may be a rough heuristic, hardcoded value, or otherwise completely inaccurate.
   */
   public abstract long cost();




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