@Override
 public int advance(int target) throws IOException {
   assertThread("Sorted numeric doc values", creationThread);
   assert target >= 0;
   assert target >= in.docID();
   int docID = in.advance(target);
   assert docID == in.docID();
   assert docID >= target;
   assert docID == NO_MORE_DOCS || docID < maxDoc;
   lastDocID = docID;
   valueUpto = 0;
   return docID;
 }
 @Override
 public int nextDoc() throws IOException {
   assertThread("Sorted numeric doc values", creationThread);
   int docID = in.nextDoc();
   assert docID > lastDocID;
   assert docID == NO_MORE_DOCS || docID < maxDoc;
   assert docID == in.docID();
   lastDocID = docID;
   valueUpto = 0;
   return docID;
 }
 @Override
 public int docID() {
   return in.docID();
 }