if (oldDoc.getTreeLevel(gid) >= doc.reindexRequired()) {
if (oldDoc.getTreeLevel(gid) >= doc.getMetadata().reindexRequired()) {
			public Object start() throws ReadOnlyException {				try {					Value ref = new NodeRef(doc.getDocId());					IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref);					final ArrayList nodes = domDb.findKeys(query);					long gid;					for (Iterator i = nodes.iterator(); i.hasNext();) {						ref = (Value) i.next();						gid = ByteConversion.byteToLong(ref.data(), ref.start() + 4);						if (oldDoc.getTreeLevel(gid) >= doc.reindexRequired()) {							if (node != null) {								if (XMLUtil.isDescendant(oldDoc, node.getGID(), gid)) {									domDb.removeValue(transaction, ref);								}							} else								domDb.removeValue(transaction, ref);						}					}				} catch (BTreeException e) {					LOG.debug("Exception while reindexing document: " + e.getMessage(), e);				} catch (IOException e) {					LOG.debug("Exception while reindexing document: " + e.getMessage(), e);				}				return null;			}