lucene
lucene copied to clipboard
ExitableDirectoryReader should not cover-up singletons
Description
Currently using the ExitableDirectoryReader will render some optimizations for Singleton Numeric/SortedDocValues useless since it covers up whether the returned SortedSetDocValues or SortedNumericDocValues are singletons.
The fix is to check if they are singletons, and if so then filter the unwrapped singleton and then re-wrap it.
~I actually think this was my mistake, the wrapping/unwrapping is done in DocValues after fetching from the leaf reader. So this is likely unnecessary.~
Nevermind, this is definitely necessary.