You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public boolean skipTo(Term target) throws IOException {
// already here
if (t != null && t.equals(target)) return true;
int startIdx = Arrays.binarySearch(tindex.index,target.text());
if (startIdx >= 0) {
// we hit the term exactly... lucky us!
if (tenum != null) tenum.close();
tenum = reader.terms(target);
pos = startIdx << tindex.intervalBits;
return setTerm();
}
// we didn't hit the term exactly
startIdx=-startIdx-1;
if (startIdx == 0) {
// our target occurs *before* the first term
if (tenum != null) tenum.close();
tenum = reader.terms(target);
pos = 0;
return setTerm();
}
/** Returns an enumeration of terms starting at or after the named term. */
public SegmentTermEnum terms(Term term) throws IOException {
BytesRef termBytesRef = new BytesRef(term.text);
get(term, true, termBytesRef);
return (SegmentTermEnum)getThreadResources().termEnum.clone();
}
The text was updated successfully, but these errors were encountered:
/** Returns an enumeration of terms starting at or after the named term. */
public SegmentTermEnum terms(Term term) throws IOException {
BytesRef termBytesRef = new BytesRef(term.text);
get(term, true, termBytesRef);
return (SegmentTermEnum)getThreadResources().termEnum.clone();
}
The text was updated successfully, but these errors were encountered: