public int goTo(int did) {

		int startSkipIndex = 0;
		if (did > skipList.get(currentSkipIndex).did) {
			startSkipIndex = currentSkipIndex;
		}

		// Look up the skip list to get the did that is equal
		// or just greater than the incoming did
		int selectedSkipIndex = 0;
		for (int i = startSkipIndex; i < skipList.size(); i++) {
			if (skipList.get(i).did >= did) {
				if (i > 0) {
					selectedSkipIndex = i - 1;
				} else {
					selectedSkipIndex = i;
				}
				break;
			}
		}

		int currentDid = current();
		if (did < currentDid) {
			currentDocIndex = skipList.get(selectedSkipIndex).index;
			currentBaseDid = skipList.get(selectedSkipIndex).did;
			currentWeightIndex = skipList.get(selectedSkipIndex).weightIndex;
			currentSkipIndex = selectedSkipIndex;
		}

		// Start decompressing delta doc bytes
		while (hasNext() && currentDid < did) {
			next();
			currentDid = current();
		}

		// Special case to handle when the did is more than the
		// last doc id
		if (currentDid < did) {
			currentDocIndex = docs.size();
			currentWeightIndex = weights.size();
			currentBaseDid = current();
		}

		return (SKIP_INTERVAL * (selectedSkipIndex - startSkipIndex));
	}