Package org.apache.lucene.index

Examples of org.apache.lucene.index.SegmentInfoPerCommit


      throws IOException {
    int expungeCandidate = -1;
    int maxDelCount = 0;

    for (int i = maxNumSegments - 1; i >= 0; i--) {
      SegmentInfoPerCommit info = infos.info(i);
      int delCount = info.getDelCount();
      if (delCount > maxDelCount) {
        expungeCandidate = i;
        maxDelCount = delCount;
      }
    }
View Full Code Here


    SegmentInfos infos = new SegmentInfos();
    try {
      infos.read(idx);
      StringBuilder buf = new StringBuilder();
      for (int i = 0; i < infos.size(); i++) {
        SegmentInfoPerCommit segInfo = infos.info(i);
        buf.append("[").append(segInfo.info.name).append(",numDoc:").append(segInfo.info.getDocCount())
            .append(",numDel:").append(segInfo.getDelCount()).append("]");
      }
      return buf.toString();
    } catch (Exception e) {
      return e.toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.index.SegmentInfoPerCommit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.