示例#1
0
 @Override
 public SeekStatus seekCeil(BytesRef target) throws IOException {
   updateEnum(fstEnum.seekCeil(target));
   if (term == null) {
     return SeekStatus.END;
   } else {
     return term.equals(target) ? SeekStatus.FOUND : SeekStatus.NOT_FOUND;
   }
 }
 @Override
 public SeekStatus seekCeil(BytesRef text) throws IOException {
   if (in.seekCeil(text) == null) {
     return SeekStatus.END;
   } else if (term().equals(text)) {
     // TODO: add SeekStatus to FSTEnum like in https://issues.apache.org/jira/browse/LUCENE-3729
     // to remove this comparision?
     return SeekStatus.FOUND;
   } else {
     return SeekStatus.NOT_FOUND;
   }
 }