[ 
https://issues.apache.org/jira/browse/LUCENE-10603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556891#comment-17556891
 ] 

Greg Miller commented on LUCENE-10603:
--------------------------------------

[~ChrisLu] thanks again for proposing this. I've merged the work in the 
{{facets}} module to use the new style of iteration, but there's still plenty 
more locations in our code base that need updating. Let me know if you want any 
help with this. I'm happy to divide up some of the modules if you'd like (or 
maybe we can recruit others if interested as well).

In the meantime, I propose we get this {{NO_MORE_ORDS}} constant marked as 
{{deprecated}} so we have a shot of removing it in a 10.0 release. By removing 
it, as [~jpountz] points out in 
[#954|https://github.com/apache/lucene/pull/954], we may have a performance 
benefit since we won't need the book-keeping to keep it updated. I opened 
another PR for this: [#969|https://github.com/apache/lucene/pull/969].

> Improve iteration of ords for SortedSetDocValues
> ------------------------------------------------
>
>                 Key: LUCENE-10603
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10603
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Lu Xugang
>            Assignee: Lu Xugang
>            Priority: Trivial
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> After SortedSetDocValues#docValueCount added since Lucene 9.2, should we 
> refactor the implementation of ords iterations using docValueCount instead of 
> NO_MORE_ORDS?
> Similar how SortedNumericDocValues did
> From 
> {code:java}
> for (long ord = values.nextOrd();ord != SortedSetDocValues.NO_MORE_ORDS; ord 
> = values.nextOrd()) {
> }{code}
> to
> {code:java}
> for (int i = 0; i < values.docValueCount(); i++) {
>   long ord = values.nextOrd();
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to