assert docId > lastDocId;
lastDocId = docId;
do {
Bytes idTerm = idQuery.term();
assert idTerm.compareToParts(ID_BYTES, 0, 0, NUM_ID_BYTES, NUM_ID_BYTES, 9) == 0;
byte[] idBytes = idTerm.subBytes(NUM_ID_BYTES, idTerm.getLength()-NUM_ID_BYTES).getBytes();
String idString = Util.encodeBytes(idBytes);
Object val = entries.get(idString);
if (val != null) {
entries.remove(idString);
DbServiceUtil.sencodeMulti(ArrayBytes.EMPTY_BYTES, ArrayBytes.EMPTY_BYTES, val, edits, docId, false);