Package org.apache.lucene.index

Examples of org.apache.lucene.index.SegmentInfos.info()


    {
      infos.read(idx);
      String x="";
      for(int i=0;i<infos.size(); i++)
      {
        x += "[numDoc:" + infos.info(i).docCount + ",numDel:"+infos.info(i).getDelCount()+"]";
      }
      return x;
    } catch (Exception e)
    {
      return e.toString();
View Full Code Here


    {
      infos.read(idx);
      String x="";
      for(int i=0;i<infos.size(); i++)
      {
        x += "[numDoc:" + infos.info(i).docCount + ",numDel:"+infos.info(i).getDelCount()+"]";
      }
      return x;
    } catch (Exception e)
    {
      return e.toString();
View Full Code Here

    }
   
    ArrayList<BoboIndexReader> currentReaders = new ArrayList<BoboIndexReader>(size);
    boolean isNewReader = false;
    for (int i=0;i<size;++i){
      SegmentInfo sinfo = (SegmentInfo)sinfos.info(i);
      BoboIndexReader breader = readerMap.remove(sinfo.name);
      if (breader!=null){
        // should use SegmentReader.reopen
        // TODO: see LUCENE-2559
        BoboIndexReader newReader = (BoboIndexReader)breader.reopen(true);
View Full Code Here

   
    SegmentInfo sinfo = null;
    boolean sameSeg = false;
    //get SegmentInfo instance
    for (int i=0;i<size;++i){
    SegmentInfo sinfoTmp = (SegmentInfo)sinfos.info(i);
    if (sinfoTmp.name.equals(sreader.getSegmentName())){
      int numDels2 = sinfoTmp.getDelCount();
      sameSeg = numDels==numDels2;
      sinfo = sinfoTmp;
      break;
View Full Code Here

    }
   
    ArrayList<BoboIndexReader> currentReaders = new ArrayList<BoboIndexReader>(size);
    boolean isNewReader = false;
    for (int i=0;i<size;++i){
      SegmentInfo sinfo = (SegmentInfo)sinfos.info(i);
      BoboIndexReader breader = readerMap.remove(sinfo.name);
      if (breader!=null){
        // should use SegmentReader.reopen
        // TODO: see LUCENE-2559
        BoboIndexReader newReader = (BoboIndexReader)breader.reopen(true);
View Full Code Here

   
    SegmentInfo sinfo = null;
    boolean sameSeg = false;
    //get SegmentInfo instance
    for (int i=0;i<size;++i){
    SegmentInfo sinfoTmp = (SegmentInfo)sinfos.info(i);
    if (sinfoTmp.name.equals(sreader.getSegmentName())){
      int numDels2 = sinfoTmp.getDelCount();
      sameSeg = numDels==numDels2;
      sinfo = sinfoTmp;
      break;
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) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.