private int getKeyIndex(long key) {

		int min = 0;
		int max = keyCount - 1;

		while (min <= max) {
			int i = (min + max) / 2;
			long k = getKey(i);
			if (k == key) {
				return i;
			}
			else if (k < key) {
				min = i + 1;
			}
			else {
				max = i - 1;
			}
		}
		return -(min + 1);
	}
Perform a binary search to locate the specified key and derive an index
into the Buffer ID storage.  This method is intended to find the insertion 
index or exact match for a child key.  A negative value will be returned
when an exact match is not found and may be transformed into an 
insertion index (insetIndex = -returnedIndex-1).
@param key key to search for
@return int buffer ID index.
Ghidra/Framework/DB/src/main/java/db/LongKeyInteriorNode.java