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