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 
override contract within VectorValues.java for `cost()`?
   
   
--------------------------------------------------------------------------------------------------------------
   DocIdSetIterator.java
   
   /**
   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-unsubscr...@lucene.apache.org

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



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

Reply via email to