public Map<String, List<IndexTracerResult>> sampleIndex(AtomicReader atomicReader, String context) throws IOException {
Map<String, List<IndexTracerResult>> results = new HashMap<String, List<IndexTracerResult>>();
if (atomicReader instanceof SegmentReader) {
SegmentReader segmentReader = (SegmentReader) atomicReader;
Directory directory = segmentReader.directory();
if (!(directory instanceof TraceableDirectory)) {
LOG.info("Context [{1}] cannot warmup directory [{0}] needs to be a TraceableDirectory.", directory, context);
return results;
}
IndexTracer tracer = new IndexTracer((TraceableDirectory) directory, _maxSampleSize);