: : The problem is SlowCompositeReaderWrapper.wrap(searcher.getIndexReader()); : you hardly ever need to to this, at least because Solr already does it.
Specifically you should just use... searcher.getLeafReader().getSortedSetDocValues(your_field_anme) ...instead of doing all this wrapping yourself. If the field docValues="true" declared, this will all be precomputed at index time and super fast. if not, then the UninvertingReader logic will kick in once per searcher -- if you want to "pre-warm" it just configure a requests that exercises your code as part of a firstSearcher and newSearcher event listeners. -Hoss http://www.lucidworks.com/