QueryUtils.check(random, q,s);
ScoreDoc[] h = s.search(q, null, 1000).scoreDocs;
assertEquals("All docs should be matched!",N_DOCS,h.length);
String prevID = "ID"+(N_DOCS+1); // greater than all ids of docs in this test
for (int i=0; i<h.length; i++) {
String resID = s.doc(h[i].doc).get(ID_FIELD);
log(i+". score="+h[i].score+" - "+resID);
log(s.explain(q,h[i].doc));
assertTrue("res id "+resID+" should be < prev res id "+prevID, resID.compareTo(prevID)<0);
prevID = resID;
}