You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "martijnvg (via GitHub)" <gi...@apache.org> on 2025/04/10 06:01:27 UTC

[PR] Move some DocValuesConsumer merge logic to helper methods. [lucene]

martijnvg opened a new pull request, #14459:
URL: https://github.com/apache/lucene/pull/14459

   Move code that creates merged doc value instances and ordinal map to protected helper methods. This will allow custom DocValuesConsumer implementations to reuse these helper methods while providing custom merging logic.
   


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


Re: [PR] Move some DocValuesConsumer merge logic to helper methods. [lucene]

Posted by "stefanvodita (via GitHub)" <gi...@apache.org>.
stefanvodita commented on PR #14459:
URL: https://github.com/apache/lucene/pull/14459#issuecomment-2804349293

   Thanks for the explanation! The new revision looks good as well.


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


Re: [PR] Move some DocValuesConsumer merge logic to helper methods. [lucene]

Posted by "martijnvg (via GitHub)" <gi...@apache.org>.
martijnvg commented on PR #14459:
URL: https://github.com/apache/lucene/pull/14459#issuecomment-2807092322

   Thanks for the reviews @dnhatn and @stefanvodita.


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


Re: [PR] Move some DocValuesConsumer merge logic to helper methods. [lucene]

Posted by "martijnvg (via GitHub)" <gi...@apache.org>.
martijnvg commented on PR #14459:
URL: https://github.com/apache/lucene/pull/14459#issuecomment-2804123675

   Thanks for taking a look @stefanvodita! I've added the CHANGES entry.
   
   > Curious if you can share more about what you're trying to achieve!
   
   We have [a specialized doc values codec](https://github.com/elastic/elasticsearch/tree/main/server/src/main/java/org/elasticsearch/index/codec/tsdb/es819) for append only use cases that relies on index sorting. In order to speed up merging, we make use of the metadata statistics of the doc value producer in order to avoid pulling doc values instances from the producer and iterating over it multiple times. When indexing sorting is active, then this is more expensive. The consumer of this doc value codec creates a custom producer instance in the `merge*(...)` methods, which the `add*Field(...)` methods use to determine whether metadata statistics need to be computed or not. However the logic that creates the merged doc value instances and ordinal map are identical in the `DocValuesConsumer` class. This PR will allow us the reuse that logic and I think anyone creating a custom doc value codec with custom merge logic can benefit from this as well.


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


Re: [PR] Move some DocValuesConsumer merge logic to helper methods. [lucene]

Posted by "martijnvg (via GitHub)" <gi...@apache.org>.
martijnvg merged PR #14459:
URL: https://github.com/apache/lucene/pull/14459


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