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/21 07:39:28 UTC

[GitHub] [lucene] iverase opened a new pull request #698: LUCENE-10429: Change how DocIdSetBuilder compute the cost of the dense iterator

iverase opened a new pull request #698:
URL: https://github.com/apache/lucene/pull/698


   We currently compute the cost of the dense iterator using the following code:
   
   ```
   final long cost = Math.round(counter / numValuesPerDoc);
   ```
   
   Where counter is how many values have been added to the builder. This is inconsistent with the `#grow` method where the counter is increased as it expects grow to be called for documents and no values. Therefore in this PR is proposed to change the way  we compute the cost to reflect that counter refers to documents and not to values:
   
   ```
   final long cost = Math.min(counter, docCount)
   ```
   


-- 
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] iverase closed pull request #698: LUCENE-10429: Change how DocIdSetBuilder compute the cost of the dense iterator

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


   


-- 
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] iverase commented on pull request #698: LUCENE-10429: Change how DocIdSetBuilder compute the cost of the dense iterator

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


   won't happen


-- 
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] iverase commented on pull request #698: LUCENE-10429: Change how DocIdSetBuilder compute the cost of the dense iterator

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


   > Actually my expectation is that grow() is called with a number of values, not unique documents.
   
   Then it is wrong that accepts an int and should accept a long? which is what Robert complains about 


-- 
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 #698: LUCENE-10429: Change how DocIdSetBuilder compute the cost of the dense iterator

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


   > This is inconsistent with the #grow method where the counter is increased as it expects grow to be called for documents and no values.
   
   Actually my expectation is that `grow()` is called with a number of values, not unique documents. Javadocs say "documents" today, which might be a source of confusion, but it is really an upper bound of the number of times `BulkAdder#add` may be called, ie. an upper bound of the number of matching *values*?


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