if((fullReindex || doc.getTreeLevel(node.getGID()) >= doc.reindexRequired())) {
if((fullReindex || doc.getTreeLevel(node.getGID()) >= doc.getMetadata().reindexRequired())) {
	private void scanNodes(Txn transaction, Iterator iterator, StoredNode node, NodePath currentPath,	        boolean fullReindex, boolean repairMode) {		if (node.getNodeType() == Node.ELEMENT_NODE)		    currentPath.addComponent(node.getQName());		if(fullReindex)		    index(transaction, node, currentPath, repairMode);		else		    reindex(transaction, node, currentPath);		final DocumentImpl doc = (DocumentImpl) node.getOwnerDocument();		if (node.hasChildNodes()) {			final long firstChildId = XMLUtil.getFirstChildId(doc, node.getGID());            			if (firstChildId < 0) {				LOG.fatal(					"no child found: expected = "						+ node.getChildCount()						+ "; node = "						+ node.getNodeName()						+ "; gid = "						+ node.getGID());				throw new IllegalStateException("wrong node id");			}			final long lastChildId = firstChildId + node.getChildCount();			StoredNode child;			for (long gid = firstChildId; gid < lastChildId; gid++) {				child = (StoredNode) iterator.next();				if(child == null)					LOG.debug("child " + gid + " not found for node: " + node.getNodeName() +							"; last = " + lastChildId + "; children = " + node.getChildCount());				child.setGID(gid);				scanNodes(transaction, iterator, child, currentPath, fullReindex, repairMode);			}		}		if (node.getNodeType() == Node.ELEMENT_NODE) {			if((fullReindex || doc.getTreeLevel(node.getGID()) >= doc.reindexRequired())) {			    endElement(node, currentPath, null);			}			currentPath.removeLastComponent();		}	}