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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? checkindex.java

?? lucene-2.4.0 是一個(gè)全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
package org.apache.lucene.index;/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */import org.apache.lucene.store.FSDirectory;import org.apache.lucene.store.Directory;import org.apache.lucene.store.IndexInput;import org.apache.lucene.document.Document;import java.text.NumberFormat;import java.io.PrintStream;import java.io.IOException;import java.util.Collection;import java.util.Iterator;import java.util.List;import java.util.ArrayList;import org.apache.lucene.document.Fieldable;          // for javadoc/** * Basic tool and API to check the health of an index and * write a new segments file that removes reference to * problematic segments. *  * <p>As this tool checks every byte in the index, on a large * index it can take quite a long time to run. * * <p><b>WARNING</b>: this tool and API is new and * experimental and is subject to suddenly change in the * next release.  Please make a complete backup of your * index before using this to fix your index! */public class CheckIndex {  /** Default PrintStream for all CheckIndex instances.   *  @deprecated Use {@link #setInfoStream} per instance,   *  instead. */  public static PrintStream out = null;  private PrintStream infoStream;  private Directory dir;  /**   * Returned from {@link #checkIndex()} detailing the health and status of the index.   *   * <p><b>WARNING</b>: this API is new and experimental and is   * subject to suddenly change in the next release.   **/  public static class Status {    /** True if no problems were found with the index. */    public boolean clean;    /** True if we were unable to locate and load the segments_N file. */    public boolean missingSegments;    /** True if we were unable to open the segments_N file. */    public boolean cantOpenSegments;    /** True if we were unable to read the version number from segments_N file. */    public boolean missingSegmentVersion;    /** Name of latest segments_N file in the index. */    public String segmentsFileName;    /** Number of segments in the index. */    public int numSegments;    /** String description of the version of the index. */    public String segmentFormat;    /** Empty unless you passed specific segments list to check as optional 3rd argument.     *  @see CheckIndex#checkIndex(List) */    public List/*<String>*/ segmentsChecked = new ArrayList();      /** True if the index was created with a newer version of Lucene than the CheckIndex tool. */    public boolean toolOutOfDate;    /** List of {@link SegmentInfoStatus} instances, detailing status of each segment. */    public List/*<SegmentInfoStatus*/ segmentInfos = new ArrayList();      /** Directory index is in. */    public Directory dir;    /** SegmentInfos instance containing only segments that     *  had no problems (this is used with the {@link     *  CheckIndex#fix} method to repair the index. */    SegmentInfos newSegments;    /** How many documents will be lost to bad segments. */    public int totLoseDocCount;    /** How many bad segments were found. */    public int numBadSegments;    /** True if we checked only specific segments ({@link     * #checkIndex(List)}) was called with non-null     * argument). */    public boolean partial;    /** Holds the status of each segment in the index.     *  See {@link #segmentInfos}.     *     * <p><b>WARNING</b>: this API is new and experimental and is     * subject to suddenly change in the next release.     */    public static class SegmentInfoStatus {      /** Name of the segment. */      public String name;      /** Document count (does not take deletions into account). */      public int docCount;      /** True if segment is compound file format. */      public boolean compound;      /** Number of files referenced by this segment. */      public int numFiles;      /** Net size (MB) of the files referenced by this       *  segment. */      public double sizeMB;      /** Doc store offset, if this segment shares the doc       *  store files (stored fields and term vectors) with       *  other segments.  This is -1 if it does not share. */      public int docStoreOffset = -1;          /** String of the shared doc store segment, or null if       *  this segment does not share the doc store files. */      public String docStoreSegment;      /** True if the shared doc store files are compound file       *  format. */      public boolean docStoreCompoundFile;      /** True if this segment has pending deletions. */      public boolean hasDeletions;      /** Name of the current deletions file name. */      public String deletionsFileName;          /** Number of deleted documents. */      public int numDeleted;      /** True if we were able to open a SegmentReader on this       *  segment. */      public boolean openReaderPassed;      /** Number of fields in this segment. */      int numFields;      /** True if at least one of the fields in this segment       *  does not omitTf.       *  @see Fieldable#setOmitTf */      public boolean hasProx;    }  }  /** Create a new CheckIndex on the directory. */  public CheckIndex(Directory dir) {    this.dir = dir;    infoStream = out;  }  /** Set infoStream where messages should go.  If null, no   *  messages are printed */  public void setInfoStream(PrintStream out) {    infoStream = out;  }  private void msg(String msg) {    if (infoStream != null)      infoStream.println(msg);  }  private static class MySegmentTermDocs extends SegmentTermDocs {    int delCount;    MySegmentTermDocs(SegmentReader p) {          super(p);    }    public void seek(Term term) throws IOException {      super.seek(term);      delCount = 0;    }    protected void skippingDoc() throws IOException {      delCount++;    }  }  /** Returns true if index is clean, else false.    *  @deprecated Please instantiate a CheckIndex and then use {@link #checkIndex()} instead */  public static boolean check(Directory dir, boolean doFix) throws IOException {    return check(dir, doFix, null);  }  /** Returns true if index is clean, else false.   *  @deprecated Please instantiate a CheckIndex and then use {@link #checkIndex(List)} instead */  public static boolean check(Directory dir, boolean doFix, List onlySegments) throws IOException {    CheckIndex checker = new CheckIndex(dir);    Status status = checker.checkIndex(onlySegments);    if (doFix && !status.clean)      checker.fixIndex(status);    return status.clean;  }  /** Returns a {@link Status} instance detailing   *  the state of the index.   *   *  <p>As this method checks every byte in the index, on a large   *  index it can take quite a long time to run.   *   *  <p><b>WARNING</b>: make sure   *  you only call this when the index is not opened by any   *  writer. */  public Status checkIndex() throws IOException {    return checkIndex(null);  }  /** Returns a {@link Status} instance detailing   *  the state of the index.   *    *  @param onlySegments list of specific segment names to check   *   *  <p>As this method checks every byte in the specified   *  segments, on a large index it can take quite a long   *  time to run.   *   *  <p><b>WARNING</b>: make sure   *  you only call this when the index is not opened by any   *  writer. */  public Status checkIndex(List onlySegments) throws IOException {    NumberFormat nf = NumberFormat.getInstance();    SegmentInfos sis = new SegmentInfos();    Status result = new Status();    result.dir = dir;    try {      sis.read(dir);    } catch (Throwable t) {      msg("ERROR: could not read any segments file in directory");      result.missingSegments = true;      if (infoStream != null)        t.printStackTrace(infoStream);      return result;    }    final int numSegments = sis.size();    final String segmentsFileName = sis.getCurrentSegmentFileName();    IndexInput input = null;    try {      input = dir.openInput(segmentsFileName);    } catch (Throwable t) {      msg("ERROR: could not open segments file in directory");      if (infoStream != null)        t.printStackTrace(infoStream);      result.cantOpenSegments = true;      return result;    }    int format = 0;    try {      format = input.readInt();    } catch (Throwable t) {      msg("ERROR: could not read segment file version in directory");      if (infoStream != null)        t.printStackTrace(infoStream);      result.missingSegmentVersion = true;      return result;    } finally {      if (input != null)        input.close();    }    String sFormat = "";    boolean skip = false;    if (format == SegmentInfos.FORMAT)      sFormat = "FORMAT [Lucene Pre-2.1]";    if (format == SegmentInfos.FORMAT_LOCKLESS)      sFormat = "FORMAT_LOCKLESS [Lucene 2.1]";    else if (format == SegmentInfos.FORMAT_SINGLE_NORM_FILE)      sFormat = "FORMAT_SINGLE_NORM_FILE [Lucene 2.2]";    else if (format == SegmentInfos.FORMAT_SHARED_DOC_STORE)      sFormat = "FORMAT_SHARED_DOC_STORE [Lucene 2.3]";    else {      if (format == SegmentInfos.FORMAT_CHECKSUM)        sFormat = "FORMAT_CHECKSUM [Lucene 2.4]";      else if (format == SegmentInfos.FORMAT_DEL_COUNT)        sFormat = "FORMAT_DEL_COUNT [Lucene 2.4]";      else if (format == SegmentInfos.FORMAT_HAS_PROX)        sFormat = "FORMAT_HAS_PROX [Lucene 2.4]";      else if (format < SegmentInfos.CURRENT_FORMAT) {        sFormat = "int=" + format + " [newer version of Lucene than this tool]";        skip = true;      } else {        sFormat = format + " [Lucene 1.3 or prior]";      }    }    msg("Segments file=" + segmentsFileName + " numSegments=" + numSegments + " version=" + sFormat);    result.segmentsFileName = segmentsFileName;    result.numSegments = numSegments;    result.segmentFormat = sFormat;    if (onlySegments != null) {      result.partial = true;      if (infoStream != null)        infoStream.print("\nChecking only these segments:");      Iterator it = onlySegments.iterator();      while (it.hasNext()) {        if (infoStream != null)          infoStream.print(" " + it.next());      }      result.segmentsChecked.addAll(onlySegments);      msg(":");    }    if (skip) {      msg("\nERROR: this index appears to be created by a newer version of Lucene than this tool was compiled on; please re-compile this tool on the matching version of Lucene; exiting");      result.toolOutOfDate = true;      return result;    }    result.newSegments = (SegmentInfos) sis.clone();    result.newSegments.clear();    for(int i=0;i<numSegments;i++) {      final SegmentInfo info = sis.info(i);      if (onlySegments != null && !onlySegments.contains(info.name))        continue;      Status.SegmentInfoStatus segInfoStat = new Status.SegmentInfoStatus();      result.segmentInfos.add(segInfoStat);      msg("  " + (1+i) + " of " + numSegments + ": name=" + info.name + " docCount=" + info.docCount);      segInfoStat.name = info.name;      segInfoStat.docCount = info.docCount;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三| 天堂成人免费av电影一区| 国产精品不卡在线观看| 久久久www成人免费无遮挡大片| 欧美一区二区性放荡片| 精品久久人人做人人爽| 久久亚洲精品小早川怜子| 欧美大片顶级少妇| 久久女同互慰一区二区三区| 国产精品美女久久久久久2018| 国产精品亲子伦对白| 亚洲国产va精品久久久不卡综合| 亚洲无线码一区二区三区| 另类中文字幕网| eeuss鲁片一区二区三区 | 天堂影院一区二区| 久久99精品国产麻豆婷婷洗澡| 韩国v欧美v亚洲v日本v| 欧美成人一区二区三区| 国产亚洲综合色| 亚洲在线成人精品| 精品亚洲欧美一区| 91在线国产福利| 26uuu久久天堂性欧美| 久久精品久久精品| 色香蕉成人二区免费| 日韩午夜在线观看| 亚洲精品中文字幕乱码三区| 美女mm1313爽爽久久久蜜臀| 99精品久久99久久久久| 日韩一级片网站| 一区二区三区国产精华| 国产成人丝袜美腿| 在线电影院国产精品| 一区二区三区电影在线播| 国产美女av一区二区三区| 欧美乱妇15p| 一区二区三区成人| 成人黄色av网站在线| 91精品国产麻豆国产自产在线 | 制服丝袜亚洲网站| 亚洲免费在线观看视频| 成人免费黄色在线| 久久九九国产精品| 精品一区二区精品| 2017欧美狠狠色| 国内精品久久久久影院薰衣草| 欧美精品 日韩| 无吗不卡中文字幕| 欧美三级视频在线| 亚洲国产精品久久久男人的天堂| 国产精品一区二区无线| 欧美日韩一区久久| 一区二区三区日本| 欧美日韩亚洲高清一区二区| 一区二区欧美国产| 欧美日韩在线播放三区| 日韩高清不卡一区二区三区| 日韩一区二区三区视频在线| 蜜臀av一级做a爰片久久| 日韩精品一区二区三区swag| 国产一区二三区| 国产精品入口麻豆原神| 一本到一区二区三区| 亚洲午夜精品17c| 欧美浪妇xxxx高跟鞋交| 青青青爽久久午夜综合久久午夜| 91片黄在线观看| 亚洲影院久久精品| 成人激情午夜影院| 中文字幕亚洲欧美在线不卡| 99精品欧美一区二区蜜桃免费| 亚洲人成网站精品片在线观看| 国产大陆亚洲精品国产| 国产欧美综合在线观看第十页| 粉嫩av亚洲一区二区图片| 亚洲欧洲无码一区二区三区| 99精品偷自拍| 1024国产精品| 日韩午夜三级在线| 国产精品一二三四| 一区二区三区四区视频精品免费| 8v天堂国产在线一区二区| 久久99九九99精品| 亚洲精品国产一区二区精华液| 欧美日韩中文字幕精品| 国产乱子伦视频一区二区三区| 亚洲丝袜精品丝袜在线| 3d动漫精品啪啪| 国产精品18久久久久久vr| 亚洲在线观看免费视频| 欧美偷拍一区二区| 国产精品1024久久| 91精品国产91久久综合桃花| 亚洲一区影音先锋| 日韩女优毛片在线| 色综合天天综合网国产成人综合天 | 捆绑紧缚一区二区三区视频| 中文字幕在线观看一区| 欧美一区二区三区免费| 欧美日韩精品一区二区三区四区| 久久99久久久欧美国产| 亚洲福中文字幕伊人影院| 日本一区二区在线不卡| 欧美大片一区二区| 欧美日韩国产美女| 欧美亚洲自拍偷拍| 91色porny| 国产曰批免费观看久久久| 日本人妖一区二区| 亚洲成国产人片在线观看| 亚洲免费观看高清在线观看| 久久九九国产精品| 欧美激情一区二区在线| 精品国产91九色蝌蚪| 日韩欧美自拍偷拍| 91精品国产手机| 色婷婷av一区二区三区软件| 波多野结衣在线一区| 黄色日韩三级电影| 国产精品一级片| 91浏览器打开| 91蜜桃婷婷狠狠久久综合9色| 91社区在线播放| 在线观看中文字幕不卡| 欧美美女直播网站| 3d成人动漫网站| 国产女人18毛片水真多成人如厕 | 精品久久久久一区二区国产| 欧美mv日韩mv国产网站app| 国产日产欧美一区| 欧美日韩国产小视频在线观看| 国产一区日韩二区欧美三区| 国产尤物一区二区| 国v精品久久久网| 色一情一伦一子一伦一区| 在线成人av影院| 欧美videos中文字幕| 中文字幕电影一区| 中文字幕一区二区三中文字幕| 亚洲男女一区二区三区| 日本欧美久久久久免费播放网| 国产麻豆一精品一av一免费| 一本大道久久a久久综合婷婷| 欧美日韩不卡视频| 亚洲国产精品高清| 亚洲欧美激情插| 久久国产欧美日韩精品| av不卡在线播放| 精品国产百合女同互慰| 五月激情丁香一区二区三区| 国产麻豆成人传媒免费观看| 色播五月激情综合网| 国产亚洲一本大道中文在线| 五月天中文字幕一区二区| zzijzzij亚洲日本少妇熟睡| 日韩视频在线一区二区| 99精品国产91久久久久久| 欧美一区二区在线视频| 亚洲综合视频在线观看| 成人午夜激情影院| 在线视频一区二区三区| 国产欧美日韩在线视频| 国产精选一区二区三区| 欧美日韩一级二级| 最新成人av在线| 国产高清亚洲一区| 国产精品你懂的| 国精产品一区一区三区mba视频| 欧美日韩情趣电影| 午夜欧美2019年伦理| 国产乱人伦精品一区二区在线观看| 日韩三级视频中文字幕| 亚洲一区二区在线视频| 色哟哟国产精品免费观看| 亚洲精品免费在线| 色一区在线观看| 午夜精品久久久久久久久久| 欧美视频你懂的| 国产精品国模大尺度视频| 99精品视频在线免费观看| 亚洲高清视频在线| 国产传媒久久文化传媒| 欧美中文字幕一二三区视频| 日韩理论片在线| 国产999精品久久| 国产精品五月天| 成人国产精品免费| 午夜精品影院在线观看| 在线观看一区日韩| 久久精品国产网站| 亚洲欧洲精品一区二区三区| 欧洲一区二区三区在线| 三级精品在线观看| 国产精品区一区二区三区| 欧美三级韩国三级日本一级| 青青青伊人色综合久久| 亚洲国产精品ⅴa在线观看| www.在线欧美| 麻豆久久一区二区|