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

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

?? checkindex.java

?? lucene-2.4.0 是一個(gè)全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕在线一区| 精品久久久久一区二区国产| 老司机一区二区| 亚洲欧美日韩在线| 久久综合久久综合久久| 欧美视频在线观看一区二区| 成人免费毛片片v| 麻豆精品一区二区| 夜夜嗨av一区二区三区网页| 久久人人97超碰com| 在线不卡一区二区| 99视频在线观看一区三区| 国产一区999| 青青草伊人久久| 亚洲午夜av在线| 日韩一区在线看| 久久新电视剧免费观看| 51精品秘密在线观看| 一本一道综合狠狠老| 成人在线视频首页| 狠狠色综合日日| 久久成人18免费观看| 视频一区欧美日韩| 一级日本不卡的影视| 中文字幕一区二区三| 国产午夜精品理论片a级大结局| 日韩欧美国产午夜精品| 欧美久久一区二区| 欧美视频完全免费看| 欧美中文字幕一二三区视频| 91在线丨porny丨国产| 久久99国产精品麻豆| 欧美日韩精品一二三区| 日韩福利电影在线| 18欧美亚洲精品| 欧美tk丨vk视频| 91精品办公室少妇高潮对白| 久久国产欧美日韩精品| 亚洲精品视频一区| 国产女人水真多18毛片18精品视频| 色综合久久久久久久| 国产真实乱对白精彩久久| 一区二区三区欧美日| 国产欧美日韩卡一| 91精品国产综合久久精品麻豆 | 欧美日韩国产首页| 成人短视频下载| 精品无人区卡一卡二卡三乱码免费卡| 亚洲欧美日韩在线| 日本一区二区三区四区在线视频 | 99这里都是精品| 国产一区久久久| 日本一不卡视频| 亚洲电影你懂得| 亚洲免费高清视频在线| 欧美国产精品一区| 久久综合久久鬼色中文字| 91精品免费在线| 欧美特级限制片免费在线观看| 不卡一区二区三区四区| 国产精品1024| 麻豆精品视频在线观看| 日韩av一区二| 亚欧色一区w666天堂| 亚洲一区二区在线播放相泽| 亚洲欧美日韩综合aⅴ视频| 国产精品久久久久久亚洲毛片| 久久久不卡网国产精品二区| 欧美第一区第二区| 日韩精品一区在线| 精品久久久久久久一区二区蜜臀| 91麻豆精品国产91久久久使用方法| 在线国产亚洲欧美| 91福利精品第一导航| 在线看不卡av| 国产精品三级av在线播放| 久久精品一区二区| 久久久久久久综合狠狠综合| 久久婷婷成人综合色| 久久日韩精品一区二区五区| 国产三级欧美三级日产三级99| 精品国产乱码久久久久久浪潮| 欧美成人vps| 久久久久久久久岛国免费| 欧美激情综合五月色丁香| 国产亲近乱来精品视频| 国产精品美女久久久久久| 国产色91在线| 一区二区视频免费在线观看| 亚洲图片欧美色图| 亚洲成人免费在线观看| 日韩av中文在线观看| 久久精品999| 国产成人精品免费| 91在线国产福利| 欧美三级韩国三级日本三斤| 日韩一区二区三区免费观看| 久久综合九色综合97婷婷女人| 国产日本一区二区| 亚洲日本乱码在线观看| 首页亚洲欧美制服丝腿| 久久狠狠亚洲综合| 不卡视频一二三| 欧美亚洲自拍偷拍| 日韩一区二区视频| 国产精品的网站| 亚洲.国产.中文慕字在线| 国产一区二区三区精品视频| 91女人视频在线观看| 在线91免费看| 国产亚洲综合av| 亚洲成年人网站在线观看| 国产在线不卡视频| 91猫先生在线| 日韩欧美第一区| 亚洲免费观看在线视频| 91黄色免费看| 久久久不卡网国产精品二区| 亚洲一区二区在线免费看| 国产一区在线看| 欧美挠脚心视频网站| 久久久久88色偷偷免费| 午夜精品视频在线观看| 成人精品一区二区三区中文字幕| 欧美美女视频在线观看| 国产女人18毛片水真多成人如厕 | 亚洲综合成人在线视频| 日本美女一区二区三区| 91小视频免费观看| 精品国产百合女同互慰| 一区二区三区成人| 丁香啪啪综合成人亚洲小说 | 99re视频这里只有精品| 精品国产乱码久久久久久久久| 亚洲国产日韩精品| 粉嫩av一区二区三区粉嫩 | 欧美中文一区二区三区| 久久九九99视频| 青青草97国产精品免费观看 | 一区二区三区在线观看欧美| 国产成人亚洲综合色影视| 欧美日韩国产一级二级| 亚洲色图在线看| av电影在线观看不卡 | 中文字幕制服丝袜一区二区三区| 久久精品国产精品亚洲综合| 欧美日韩国产a| 亚洲国产成人av网| 972aa.com艺术欧美| 国产精品入口麻豆九色| 国产成人综合网| 久久蜜臀中文字幕| 7777精品伊人久久久大香线蕉最新版| 亚洲色图欧洲色图| 91丨九色丨尤物| 国产精品久久久久四虎| 成人在线一区二区三区| 国产日韩一级二级三级| 国产传媒一区在线| 精品国一区二区三区| 美日韩一区二区三区| 91精品国产综合久久香蕉的特点| 亚洲午夜精品在线| 欧美日韩国产免费| 亚洲一二三区不卡| 欧美最猛性xxxxx直播| 亚洲午夜在线观看视频在线| 欧美色中文字幕| 日韩av一区二| 欧美www视频| 国产真实乱对白精彩久久| 久久久久久久久久久电影| 国产美女在线精品| 久久久精品tv| 成人一区二区三区中文字幕| 一区精品在线播放| 在线观看日韩高清av| 亚洲一区在线电影| 欧美日产在线观看| 九九九久久久精品| 国产免费成人在线视频| 99亚偷拍自图区亚洲| 亚洲国产毛片aaaaa无费看| 7777女厕盗摄久久久| 精品一区精品二区高清| 国产免费久久精品| 91偷拍与自偷拍精品| 亚洲国产成人av| 精品国产一二三区| 成人免费看的视频| 亚洲已满18点击进入久久| 欧美一区二区免费视频| 久久国产精品免费| 国产区在线观看成人精品| 91理论电影在线观看| 热久久免费视频| 国产精品你懂的在线| 精品视频123区在线观看| 久久99精品久久久久久国产越南| 亚洲国产高清在线|