lucene icon indicating copy to clipboard operation
lucene copied to clipboard

ExitableDirectoryReader should not cover-up singletons

Open HoustonPutman opened this issue 1 month ago • 1 comments

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.

HoustonPutman avatar Dec 11 '25 00:12 HoustonPutman

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

HoustonPutman avatar Dec 11 '25 19:12 HoustonPutman