SpanNearQuery q = makeQuery();
Weight w = searcher.createNormalizedWeight(q);
IndexReaderContext topReaderContext = searcher.getTopReaderContext();
AtomicReaderContext leave = topReaderContext.leaves().get(0);
Scorer s = w.scorer(leave, true, false, leave.reader().getLiveDocs());
assertEquals(1, s.advance(1));
}
/**
* not a direct test of NearSpans, but a demonstration of how/when
* this causes problems