亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? checkindex.java

?? lucene-2.4.0 是一個全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
      int toLoseDocCount = info.docCount;      SegmentReader reader = null;      try {        msg("    compound=" + info.getUseCompoundFile());        segInfoStat.compound = info.getUseCompoundFile();        msg("    hasProx=" + info.getHasProx());        segInfoStat.hasProx = info.getHasProx();        msg("    numFiles=" + info.files().size());        segInfoStat.numFiles = info.files().size();        msg("    size (MB)=" + nf.format(info.sizeInBytes()/(1024.*1024.)));        segInfoStat.sizeMB = info.sizeInBytes()/(1024.*1024.);        final int docStoreOffset = info.getDocStoreOffset();        if (docStoreOffset != -1) {          msg("    docStoreOffset=" + docStoreOffset);          segInfoStat.docStoreOffset = docStoreOffset;          msg("    docStoreSegment=" + info.getDocStoreSegment());          segInfoStat.docStoreSegment = info.getDocStoreSegment();          msg("    docStoreIsCompoundFile=" + info.getDocStoreIsCompoundFile());          segInfoStat.docStoreCompoundFile = info.getDocStoreIsCompoundFile();        }        final String delFileName = info.getDelFileName();        if (delFileName == null){          msg("    no deletions");          segInfoStat.hasDeletions = false;        }        else{          msg("    has deletions [delFileName=" + delFileName + "]");          segInfoStat.hasDeletions = true;          segInfoStat.deletionsFileName = delFileName;        }        if (infoStream != null)          infoStream.print("    test: open reader.........");        reader = SegmentReader.get(info);        final int numDocs = reader.numDocs();        toLoseDocCount = numDocs;        if (reader.hasDeletions()) {          if (info.docCount - numDocs != info.getDelCount()){            throw new RuntimeException("delete count mismatch: info=" + info.getDelCount() + " vs reader=" + (info.docCount - numDocs));          }          segInfoStat.numDeleted = info.docCount - numDocs;          msg("OK [" + (segInfoStat.numDeleted) + " deleted docs]");        } else {          if (info.getDelCount() != 0){            throw new RuntimeException("delete count mismatch: info=" + info.getDelCount() + " vs reader=" + (info.docCount - numDocs));          }          msg("OK");        }        if (infoStream != null)          infoStream.print("    test: fields, norms.......");        Collection fieldNames = reader.getFieldNames(IndexReader.FieldOption.ALL);        Iterator it = fieldNames.iterator();        while(it.hasNext()) {          final String fieldName = (String) it.next();          byte[] b = reader.norms(fieldName);          if (b.length != info.docCount)            throw new RuntimeException("norms for field \"" + fieldName + "\" is length " + b.length + " != maxDoc " + info.docCount);        }        msg("OK [" + fieldNames.size() + " fields]");        segInfoStat.numFields = fieldNames.size();        if (infoStream != null)          infoStream.print("    test: terms, freq, prox...");        final TermEnum termEnum = reader.terms();        final TermPositions termPositions = reader.termPositions();        // Used only to count up # deleted docs for this        // term        final MySegmentTermDocs myTermDocs = new MySegmentTermDocs(reader);        long termCount = 0;        long totFreq = 0;        long totPos = 0;        while(termEnum.next()) {          termCount++;          final Term term = termEnum.term();          final int docFreq = termEnum.docFreq();          termPositions.seek(term);          int lastDoc = -1;          int freq0 = 0;          totFreq += docFreq;          while(termPositions.next()) {            freq0++;            final int doc = termPositions.doc();            final int freq = termPositions.freq();            if (doc <= lastDoc)              throw new RuntimeException("term " + term + ": doc " + doc + " <= lastDoc " + lastDoc);            lastDoc = doc;            if (freq <= 0)              throw new RuntimeException("term " + term + ": doc " + doc + ": freq " + freq + " is out of bounds");                        int lastPos = -1;            totPos += freq;            for(int j=0;j<freq;j++) {              final int pos = termPositions.nextPosition();              if (pos < -1)                throw new RuntimeException("term " + term + ": doc " + doc + ": pos " + pos + " is out of bounds");              if (pos < lastPos)                throw new RuntimeException("term " + term + ": doc " + doc + ": pos " + pos + " < lastPos " + lastPos);            }          }          // Now count how many deleted docs occurred in          // this term:          final int delCount;          if (reader.hasDeletions()) {            myTermDocs.seek(term);            while(myTermDocs.next()) {            }            delCount = myTermDocs.delCount;          } else            delCount = 0;          if (freq0 + delCount != docFreq)            throw new RuntimeException("term " + term + " docFreq=" + docFreq + " != num docs seen " + freq0 + " + num docs deleted " + delCount);        }        msg("OK [" + termCount + " terms; " + totFreq + " terms/docs pairs; " + totPos + " tokens]");        if (infoStream != null)          infoStream.print("    test: stored fields.......");        int docCount = 0;        long totFields = 0;        for(int j=0;j<info.docCount;j++)          if (!reader.isDeleted(j)) {            docCount++;            Document doc = reader.document(j);            totFields += doc.getFields().size();          }        if (docCount != reader.numDocs())          throw new RuntimeException("docCount=" + docCount + " but saw " + docCount + " undeleted docs");        msg("OK [" + totFields + " total field count; avg " + nf.format((((float) totFields)/docCount)) + " fields per doc]");        if (infoStream != null)          infoStream.print("    test: term vectors........");        int totVectors = 0;        for(int j=0;j<info.docCount;j++)          if (!reader.isDeleted(j)) {            TermFreqVector[] tfv = reader.getTermFreqVectors(j);            if (tfv != null)              totVectors += tfv.length;          }        msg("OK [" + totVectors + " total vector count; avg " + nf.format((((float) totVectors)/docCount)) + " term/freq vector fields per doc]");        msg("");      } catch (Throwable t) {        msg("FAILED");        String comment;        comment = "fixIndex() would remove reference to this segment";        msg("    WARNING: " + comment + "; full exception:");        if (infoStream != null)          t.printStackTrace(infoStream);        msg("");        result.totLoseDocCount += toLoseDocCount;        result.numBadSegments++;        continue;      } finally {        if (reader != null)          reader.close();      }      // Keeper      result.newSegments.add(info.clone());    }    if (0 == result.numBadSegments) {      result.clean = true;      msg("No problems were detected with this index.\n");    } else      msg("WARNING: " + result.numBadSegments + " broken segments (containing " + result.totLoseDocCount + " documents) detected");    return result;  }    /** Repairs the index using previously returned result   *  from {@link #checkIndex}.  Note that this does not   *  remove any of the unreferenced files after it's done;   *  you must separately open an {@link IndexWriter}, which   *  deletes unreferenced files when it's created.   *   * <p><b>WARNING</b>: this writes a   *  new segments file into the index, effectively removing   *  all documents in broken segments from the index.   *  BE CAREFUL.   *   * <p><b>WARNING</b>: Make sure you only call this when the   *  index is not opened  by any writer. */  public void fixIndex(Status result) throws IOException {    if (result.partial)      throw new IllegalArgumentException("can only fix an index that was fully checked (this status checked a subset of segments)");    result.newSegments.commit(result.dir);  }  private static boolean assertsOn;  private static boolean testAsserts() {    assertsOn = true;    return true;  }  private static boolean assertsOn() {    assert testAsserts();    return assertsOn;  }  /** Command-line interface to check and fix an index.    <p>    Run it like this:    <pre>    java -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex pathToIndex [-fix] [-segment X] [-segment Y]    </pre>    <ul>    <li><code>-fix</code>: actually write a new segments_N file, removing any problematic segments    <li><code>-segment X</code>: only check the specified    segment(s).  This can be specified multiple times,    to check more than one segment, eg <code>-segment _2    -segment _a</code>.  You can't use this with the -fix    option.    </ul>    <p><b>WARNING</b>: <code>-fix</code> should only be used on an emergency basis as it will cause                       documents (perhaps many) to be permanently removed from the index.  Always make                       a backup copy of your index before running this!  Do not run this tool on an index                       that is actively being written to.  You have been warned!    <p>                Run without -fix, this tool will open the index, report version information                       and report any exceptions it hits and what action it would take if -fix were                       specified.  With -fix, this tool will remove any segments that have issues and                       write a new segments_N file.  This means all documents contained in the affected                       segments will be removed.    <p>                       This tool exits with exit code 1 if the index cannot be opened or has any                       corruption, else 0.   */  public static void main(String[] args) throws IOException {    boolean doFix = false;    List onlySegments = new ArrayList();    String indexPath = null;    int i = 0;    while(i < args.length) {      if (args[i].equals("-fix")) {        doFix = true;        i++;      } else if (args[i].equals("-segment")) {        if (i == args.length-1) {          System.out.println("ERROR: missing name for -segment option");          System.exit(1);        }        onlySegments.add(args[i+1]);        i += 2;      } else {        if (indexPath != null) {          System.out.println("ERROR: unexpected extra argument '" + args[i] + "'");          System.exit(1);        }        indexPath = args[i];        i++;      }    }    if (indexPath == null) {      System.out.println("\nERROR: index path not specified");      System.out.println("\nUsage: java org.apache.lucene.index.CheckIndex pathToIndex [-fix] [-segment X] [-segment Y]\n" +                         "\n" +                         "  -fix: actually write a new segments_N file, removing any problematic segments\n" +                         "  -segment X: only check the specified segments.  This can be specified multiple\n" +                          "              times, to check more than one segment, eg '-segment _2 -segment _a'.\n" +                         "              You can't use this with the -fix option\n" +                         "\n" +                          "**WARNING**: -fix should only be used on an emergency basis as it will cause\n" +                         "documents (perhaps many) to be permanently removed from the index.  Always make\n" +                         "a backup copy of your index before running this!  Do not run this tool on an index\n" +                         "that is actively being written to.  You have been warned!\n" +                         "\n" +                         "Run without -fix, this tool will open the index, report version information\n" +                         "and report any exceptions it hits and what action it would take if -fix were\n" +                         "specified.  With -fix, this tool will remove any segments that have issues and\n" +                          "write a new segments_N file.  This means all documents contained in the affected\n" +                         "segments will be removed.\n" +                         "\n" +                         "This tool exits with exit code 1 if the index cannot be opened or has any\n" +                         "corruption, else 0.\n");      System.exit(1);    }    if (!assertsOn())      System.out.println("\nNOTE: testing will be more thorough if you run java with '-ea:org.apache.lucene...', so assertions are enabled");    if (onlySegments.size() == 0)      onlySegments = null;    else if (doFix) {      System.out.println("ERROR: cannot specify both -fix and -segment");      System.exit(1);    }    System.out.println("\nOpening index @ " + indexPath + "\n");    Directory dir = null;    try {      dir = FSDirectory.getDirectory(indexPath);    } catch (Throwable t) {      System.out.println("ERROR: could not open directory \"" + indexPath + "\"; exiting");      t.printStackTrace(System.out);      System.exit(1);    }    CheckIndex checker = new CheckIndex(dir);    checker.setInfoStream(System.out);    Status result = checker.checkIndex(onlySegments);    if (!result.clean) {      if (!doFix) {        System.out.println("WARNING: would write new segments file, and " + result.totLoseDocCount + " documents would be lost, if -fix were specified\n");      } else {        System.out.println("WARNING: " + result.totLoseDocCount + " documents will be lost\n");        System.out.println("NOTE: will write new segments file in 5 seconds; this will remove " + result.totLoseDocCount + " docs from the index. THIS IS YOUR LAST CHANCE TO CTRL+C!");        for(int s=0;s<5;s++) {          try {            Thread.sleep(1000);          } catch (InterruptedException ie) {            Thread.currentThread().interrupt();            s--;            continue;          }          System.out.println("  " + (5-s) + "...");        }        System.out.println("Writing...");        checker.fixIndex(result);        System.out.println("OK");        System.out.println("Wrote new segments file \"" + result.newSegments.getCurrentSegmentFileName() + "\"");      }    }    System.out.println("");    final int exitCode;    if (result != null && result.clean == true)      exitCode = 0;    else      exitCode = 1;    System.exit(exitCode);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆swag| 亚洲视频在线观看一区| 在线看日韩精品电影| 成人三级伦理片| 成人自拍视频在线观看| 成人免费观看视频| av一区二区久久| 99视频精品在线| 色香蕉久久蜜桃| 欧美三级蜜桃2在线观看| 欧美欧美欧美欧美首页| 欧美精品v日韩精品v韩国精品v| 欧美日韩一级二级三级| 欧美一区二区在线不卡| 欧美一级片免费看| 久久久久久久久久久久久女国产乱| 制服丝袜av成人在线看| 日韩免费视频一区| 日本一区二区不卡视频| 亚洲欧美日韩成人高清在线一区| 亚洲永久免费av| 日韩成人午夜电影| 久久99精品久久久久久| 国产精品综合视频| 成人av资源在线观看| 91黄色激情网站| 日韩精品一区二区三区视频播放 | 色94色欧美sute亚洲线路一久| 色综合亚洲欧洲| 欧美一级日韩一级| 国产精品久久久久一区| 天使萌一区二区三区免费观看| 捆绑变态av一区二区三区| 成人午夜电影小说| 欧美另类videos死尸| 国产亚洲成年网址在线观看| 一区二区在线观看视频在线观看| 欧美aaaaaa午夜精品| 色综合色狠狠综合色| 91精品视频网| 国产精品国产三级国产aⅴ入口 | 国产日本欧美一区二区| 国产精品白丝在线| 久久福利资源站| 99精品国产一区二区三区不卡| 在线看一区二区| 欧美激情一区不卡| 蜜臀国产一区二区三区在线播放 | 日韩精品一区二区三区在线播放| 中文字幕日韩一区| 午夜天堂影视香蕉久久| 99国产精品久久久| 久久在线观看免费| 视频在线观看91| 色综合中文字幕国产 | 亚洲精品网站在线观看| 精品一区二区三区不卡 | 国产乱理伦片在线观看夜一区| 一本色道亚洲精品aⅴ| 精品久久一区二区| 亚洲1区2区3区视频| 成人深夜在线观看| 日韩精品最新网址| 亚洲免费成人av| 精品一区中文字幕| 欧美色综合久久| 精品国产精品一区二区夜夜嗨| 欧美经典三级视频一区二区三区| 午夜电影久久久| 在线观看视频一区二区欧美日韩| 亚洲三级免费观看| 99re这里都是精品| 亚洲欧洲99久久| 成人动漫一区二区在线| 精品不卡在线视频| 精品系列免费在线观看| 亚洲精品在线免费观看视频| 久久精品国产精品青草| 欧美一级爆毛片| 美女在线视频一区| 久久尤物电影视频在线观看| 久草这里只有精品视频| 精品1区2区在线观看| 国产大片一区二区| 国产精品美日韩| 91蝌蚪porny| 亚洲高清免费视频| 日韩一区二区电影| 国产毛片精品一区| 国产欧美一区二区精品性色超碰| 国产成人h网站| 亚洲乱码国产乱码精品精98午夜| 色综合久久中文综合久久牛| 亚洲欧美色综合| 91.xcao| 日韩高清国产一区在线| 欧美精品一区二区久久久| 久久精品国产亚洲一区二区三区| 久久久久久影视| 91黄色激情网站| 激情欧美一区二区| 中文字幕一区在线| 欧美日韩激情一区二区三区| 狠狠色丁香婷婷综合| 国产精品福利一区二区三区| 精品视频1区2区| 国产美女主播视频一区| 夜夜嗨av一区二区三区四季av| 日韩一区二区中文字幕| 国产福利一区二区三区在线视频| 亚洲色图.com| 精品国产网站在线观看| 91麻豆国产精品久久| 日韩成人av影视| 国产精品国产三级国产有无不卡| 欧美日韩极品在线观看一区| 大桥未久av一区二区三区中文| 依依成人综合视频| 欧美一区二区三区免费视频| jvid福利写真一区二区三区| 奇米777欧美一区二区| 亚洲视频在线一区| 久久久99久久| 日韩午夜电影在线观看| 91高清视频免费看| 成人免费高清视频| 国模大尺度一区二区三区| 亚洲夂夂婷婷色拍ww47| 欧美激情一区二区在线| 91精品国产一区二区三区蜜臀| 99国产精品久久久久| 久久精品国产久精国产| 亚洲福利一区二区三区| 国产精品国产自产拍在线| 精品国产成人在线影院| 欧美亚洲动漫制服丝袜| 粉嫩aⅴ一区二区三区四区| 久久国产欧美日韩精品| 亚洲最大色网站| 亚洲精品老司机| 国产精品久久久久久亚洲伦| 国产日产欧美一区二区三区| 精品国产亚洲一区二区三区在线观看| 91精品久久久久久久99蜜桃| 欧美最猛性xxxxx直播| www.色精品| 成人黄页毛片网站| 国产精品一区免费在线观看| 国内精品久久久久影院薰衣草 | 精品国产乱码久久久久久久久| 欧美日韩一区二区在线观看视频| 色偷偷一区二区三区| 99riav久久精品riav| 成人免费观看视频| 99久久99久久综合| 91老司机福利 在线| 色婷婷精品大在线视频| 日本道色综合久久| 欧美性生活久久| 91 com成人网| 26uuu成人网一区二区三区| 精品对白一区国产伦| 国产色产综合色产在线视频| 国产无人区一区二区三区| 欧美国产精品劲爆| 综合激情成人伊人| 一区二区国产视频| 全国精品久久少妇| 狠狠狠色丁香婷婷综合久久五月| 国产一区亚洲一区| 岛国av在线一区| 欧美伊人久久久久久午夜久久久久| 欧美综合久久久| 欧美v国产在线一区二区三区| 久久欧美一区二区| 亚洲精品视频免费看| 日韩福利视频导航| 国内国产精品久久| 91蜜桃传媒精品久久久一区二区| 日本精品一区二区三区高清 | 欧美精品一区二区高清在线观看| 久久久久久久网| 亚洲欧美成人一区二区三区| 亚洲成av人片一区二区| 加勒比av一区二区| 色域天天综合网| 亚洲精品一区二区在线观看| 中文字幕一区二区三区在线观看 | 中文欧美字幕免费| 亚洲乱码日产精品bd| 亚洲国产日日夜夜| 国产河南妇女毛片精品久久久| 91麻豆123| 精品国产凹凸成av人导航| 亚洲欧美福利一区二区| 蜜臀久久99精品久久久久宅男| 99久久久精品免费观看国产蜜| 日韩午夜精品电影| 中文字幕一区二区三区av| 青青草国产成人av片免费|