(nl[i].gid - nl[i].doc.getLevelStartPoint(level)) / nl[i].doc.getTreeLevelOrder(level) + nl[i].doc.getLevelStartPoint(level - 1);
(nl[i].gid - nl[i].doc.treeLevelStartPoints[level]) / nl[i].doc.treeLevelOrder[level] + nl[i].doc.treeLevelStartPoints[level - 1];
	private final static boolean getParentSet(NodeProxy[] nl) {		int level;		long pid;		boolean foundValid = false;		for (int i = 0; i < nl.length; i++) {			// skip invalid nodes			if (nl[i] == null)				continue;			if (nl[i].gid < 0) {				nl[i] = null;				continue;			}			level = nl[i].doc.getTreeLevel(nl[i].gid);			// calculate parent's gid			pid =				(nl[i].gid - nl[i].doc.getLevelStartPoint(level))					/ nl[i].doc.getTreeLevelOrder(level)					+ nl[i].doc.getLevelStartPoint(level - 1);			//System.out.println(nl[i].doc.getDocId() + ":" + nl[i].gid + "->" + pid);			nl[i].gid = pid;			if (pid > 0)				foundValid = true;		}		return foundValid;	}