Adrien Grand created LUCENE-10123:
-------------------------------------

             Summary: Avoid double wrapping of doc values at merge time
                 Key: LUCENE-10123
                 URL: https://issues.apache.org/jira/browse/LUCENE-10123
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Adrien Grand


If you have a SORTED_SET/SORTED_NUMERIC doc values that are effectively 
single-valued, the Lucene90 doc-values format internally stores them the same 
way that it stores SORTED/NUMERIC doc values, and they get wrapped with a 
singleton wrapper ({{DocValues::singleton}}) at read time.

However {{DocValuesConsumer}} doesn't optimize for singletons, which means that 
the merging process will create a merged view of the singleton wrappers, and 
that Lucene90DocValuesConsumer will then wrap this back to a single-valued view 
using {{SortedSetSelector}}.

I think it would be simpler if {{DocValuesConsumer}} detected singleton 
wrappers, unwrapped them, created a SORTED/NUMERIC merged view and only then 
wrapped it with a singleton wrapper so that {{SortedSetSelector}} would just 
unwrap it?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to