public long seek(BytesRef target) {long lo = 0;          long hi = fieldIndex.numIndexTerms - 1;while (hi >= lo) {long mid = (lo + hi) >>> 1;final long offset = fieldIndex.termOffsets.get(mid);final int length = (int) (fieldIndex.termOffsets.get(1+mid) - offset);termBytesReader.fillSlice(term, fieldIndex.termBytesStart + offset, length);int delta = target.compareTo(term);if (delta < 0) {hi = mid - 1;} else if (delta > 0) {lo = mid + 1;} else {assert mid >= 0;ord = mid*indexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.get(mid);}}if (hi < 0) {assert hi == -1;hi = 0;}final long offset = fieldIndex.termOffsets.get(hi);final int length = (int) (fieldIndex.termOffsets.get(1+hi) - offset);termBytesReader.fillSlice(term, fieldIndex.termBytesStart + offset, length);ord = hi*indexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.get(hi);}

public override long Seek(BytesRef target){int lo = 0;          int hi = fieldIndex.numIndexTerms - 1;Debug.Assert(outerInstance.totalIndexInterval > 0, "totalIndexInterval=" + outerInstance.totalIndexInterval);while (hi >= lo){int mid = (int)(((uint)(lo + hi)) >> 1);long offset2 = fieldIndex.termOffsets.Get(mid);int length2 = (int)(fieldIndex.termOffsets.Get(1 + mid) - offset2);outerInstance.termBytesReader.FillSlice(term, fieldIndex.termBytesStart + offset2, length2);int delta = outerInstance.termComp.Compare(target, term);if (delta < 0){hi = mid - 1;}else if (delta > 0){lo = mid + 1;}else{Debug.Assert(mid >= 0);ord = mid * outerInstance.totalIndexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.Get(mid);}}if (hi < 0){Debug.Assert(hi == -1);hi = 0;}long offset = fieldIndex.termOffsets.Get(hi);int length = (int)(fieldIndex.termOffsets.Get(1 + hi) - offset);outerInstance.termBytesReader.FillSlice(term, fieldIndex.termBytesStart + offset, length);ord = hi * outerInstance.totalIndexInterval;return fieldIndex.termsStart + fieldIndex.termsDictOffsets.Get(hi);}
