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

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

?? logmergepolicy.java

?? lucene-2.4.0 是一個(gè)全文收索的工具包
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(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 java.io.IOException;import java.util.Set;import org.apache.lucene.store.Directory;/** <p>This class implements a {@link MergePolicy} that tries *  to merge segments into levels of exponentially *  increasing size, where each level has < mergeFactor *  segments in it.  Whenever a given levle has mergeFactor *  segments or more in it, they will be merged.</p> * * <p>This class is abstract and requires a subclass to * define the {@link #size} method which specifies how a * segment's size is determined.  {@link LogDocMergePolicy} * is one subclass that measures size by document count in * the segment.  {@link LogByteSizeMergePolicy} is another * subclass that measures size as the total byte size of the * file(s) for the segment.</p> */public abstract class LogMergePolicy extends MergePolicy {  /** Defines the allowed range of log(size) for each   *  level.  A level is computed by taking the max segment   *  log size, minuse LEVEL_LOG_SPAN, and finding all   *  segments falling within that range. */  public static final double LEVEL_LOG_SPAN = 0.75;  /** Default merge factor, which is how many segments are   *  merged at a time */  public static final int DEFAULT_MERGE_FACTOR = 10;  /** Default maximum segment size.  A segment of this size   *  or larger will never be merged.  @see setMaxMergeDocs */  public static final int DEFAULT_MAX_MERGE_DOCS = Integer.MAX_VALUE;  private int mergeFactor = DEFAULT_MERGE_FACTOR;  long minMergeSize;  long maxMergeSize;  int maxMergeDocs = DEFAULT_MAX_MERGE_DOCS;  private boolean useCompoundFile = true;  private boolean useCompoundDocStore = true;  private IndexWriter writer;  private void message(String message) {    if (writer != null)      writer.message("LMP: " + message);  }  /** <p>Returns the number of segments that are merged at   * once and also controls the total number of segments   * allowed to accumulate in the index.</p> */  public int getMergeFactor() {    return mergeFactor;  }  /** Determines how often segment indices are merged by   * addDocument().  With smaller values, less RAM is used   * while indexing, and searches on unoptimized indices are   * faster, but indexing speed is slower.  With larger   * values, more RAM is used during indexing, and while   * searches on unoptimized indices are slower, indexing is   * faster.  Thus larger values (> 10) are best for batch   * index creation, and smaller values (< 10) for indices   * that are interactively maintained. */  public void setMergeFactor(int mergeFactor) {    if (mergeFactor < 2)      throw new IllegalArgumentException("mergeFactor cannot be less than 2");    this.mergeFactor = mergeFactor;  }  // Javadoc inherited  public boolean useCompoundFile(SegmentInfos infos, SegmentInfo info) {    return useCompoundFile;  }  /** Sets whether compound file format should be used for   *  newly flushed and newly merged segments. */  public void setUseCompoundFile(boolean useCompoundFile) {    this.useCompoundFile = useCompoundFile;  }  /** Returns true if newly flushed and newly merge segments   *  are written in compound file format. @see   *  #setUseCompoundFile */  public boolean getUseCompoundFile() {    return useCompoundFile;  }  // Javadoc inherited  public boolean useCompoundDocStore(SegmentInfos infos) {    return useCompoundDocStore;  }  /** Sets whether compound file format should be used for   *  newly flushed and newly merged doc store   *  segment files (term vectors and stored fields). */  public void setUseCompoundDocStore(boolean useCompoundDocStore) {    this.useCompoundDocStore = useCompoundDocStore;  }  /** Returns true if newly flushed and newly merge doc   *  store segment files (term vectors and stored fields)   *  are written in compound file format. @see   *  #setUseCompoundDocStore */  public boolean getUseCompoundDocStore() {    return useCompoundDocStore;  }  public void close() {}  abstract protected long size(SegmentInfo info) throws IOException;  private boolean isOptimized(SegmentInfos infos, IndexWriter writer, int maxNumSegments, Set segmentsToOptimize) throws IOException {    final int numSegments = infos.size();    int numToOptimize = 0;    SegmentInfo optimizeInfo = null;    for(int i=0;i<numSegments && numToOptimize <= maxNumSegments;i++) {      final SegmentInfo info = infos.info(i);      if (segmentsToOptimize.contains(info)) {        numToOptimize++;        optimizeInfo = info;      }    }    return numToOptimize <= maxNumSegments &&      (numToOptimize != 1 || isOptimized(writer, optimizeInfo));  }  /** Returns true if this single nfo is optimized (has no   *  pending norms or deletes, is in the same dir as the   *  writer, and matches the current compound file setting */  private boolean isOptimized(IndexWriter writer, SegmentInfo info)    throws IOException {    return !info.hasDeletions() &&      !info.hasSeparateNorms() &&      info.dir == writer.getDirectory() &&      info.getUseCompoundFile() == useCompoundFile;  }  /** Returns the merges necessary to optimize the index.   *  This merge policy defines "optimized" to mean only one   *  segment in the index, where that segment has no   *  deletions pending nor separate norms, and it is in   *  compound file format if the current useCompoundFile   *  setting is true.  This method returns multiple merges   *  (mergeFactor at a time) so the {@link MergeScheduler}   *  in use may make use of concurrency. */  public MergeSpecification findMergesForOptimize(SegmentInfos infos, IndexWriter writer, int maxNumSegments, Set segmentsToOptimize) throws IOException {    MergeSpecification spec;    assert maxNumSegments > 0;    if (!isOptimized(infos, writer, maxNumSegments, segmentsToOptimize)) {      // Find the newest (rightmost) segment that needs to      // be optimized (other segments may have been flushed      // since optimize started):      int last = infos.size();      while(last > 0) {        final SegmentInfo info = infos.info(--last);        if (segmentsToOptimize.contains(info)) {          last++;          break;        }      }      if (last > 0) {        spec = new MergeSpecification();        // First, enroll all "full" merges (size        // mergeFactor) to potentially be run concurrently:        while (last - maxNumSegments + 1 >= mergeFactor) {          spec.add(new OneMerge(infos.range(last-mergeFactor, last), useCompoundFile));          last -= mergeFactor;        }        // Only if there are no full merges pending do we        // add a final partial (< mergeFactor segments) merge:        if (0 == spec.merges.size()) {          if (maxNumSegments == 1) {            // Since we must optimize down to 1 segment, the            // choice is simple:            if (last > 1 || !isOptimized(writer, infos.info(0)))              spec.add(new OneMerge(infos.range(0, last), useCompoundFile));          } else if (last > maxNumSegments) {            // Take care to pick a partial merge that is            // least cost, but does not make the index too            // lopsided.  If we always just picked the            // partial tail then we could produce a highly            // lopsided index over time:

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级乱人伦电影| 不卡的av在线| 日韩女优制服丝袜电影| 蜜桃视频在线一区| 欧美一级电影网站| 九色|91porny| 94-欧美-setu| 精品女同一区二区| 国产精品一区二区三区乱码| 国产欧美一区二区在线| 91视频免费观看| 午夜精品久久久久久久久久| 日韩欧美美女一区二区三区| 国模少妇一区二区三区| 国产精品的网站| 欧美性色欧美a在线播放| 日韩精品欧美成人高清一区二区| 日韩精品中文字幕在线不卡尤物| 国产高清久久久久| 亚洲色图19p| 911精品国产一区二区在线| 精品写真视频在线观看| 国产蜜臀av在线一区二区三区| 色综合久久久久综合体 | 不卡欧美aaaaa| 一区二区理论电影在线观看| 91精品国产综合久久久蜜臀粉嫩 | 亚洲精品一区二区三区蜜桃下载| 成人精品鲁一区一区二区| 一区2区3区在线看| 一区二区三区免费网站| 日韩欧美一区二区久久婷婷| 成人精品鲁一区一区二区| 香蕉久久一区二区不卡无毒影院| 精品国产91洋老外米糕| 99久久久免费精品国产一区二区| 五月婷婷久久综合| ww亚洲ww在线观看国产| 色婷婷综合视频在线观看| 蜜桃视频一区二区三区在线观看| 国产精品美女久久久久久久久| 欧美日韩精品一区二区天天拍小说| 极品少妇xxxx精品少妇| 一区二区三区在线看| 日韩美一区二区三区| 色狠狠av一区二区三区| 黄色资源网久久资源365| 亚洲激情第一区| 精品福利一区二区三区免费视频| 色哟哟一区二区三区| 国产在线不卡一卡二卡三卡四卡| 亚洲综合在线电影| 在线精品视频一区二区三四| 国产专区欧美精品| 亚洲国产精品久久艾草纯爱| 日本一区二区三区视频视频| 欧美伦理电影网| av中文字幕亚洲| 激情文学综合网| 亚洲国产美国国产综合一区二区| 国产成人丝袜美腿| 中文字幕一区二区三区四区| 欧美大片一区二区三区| 欧美中文一区二区三区| 成年人午夜久久久| 极品少妇一区二区| 日韩福利电影在线| 亚洲欧美激情小说另类| 国产三级三级三级精品8ⅰ区| 在线观看91av| 色狠狠一区二区三区香蕉| 国产麻豆91精品| 美女www一区二区| 亚洲高清视频的网址| 亚洲欧洲成人av每日更新| 国产亚洲欧美激情| 欧美成人欧美edvon| 欧美日韩精品一二三区| 色哟哟国产精品免费观看| 成人网在线免费视频| 久久成人av少妇免费| 午夜私人影院久久久久| 一区二区久久久久久| 欧美一级爆毛片| 欧美日韩国产一级| 在线视频国内一区二区| 99视频国产精品| 成人免费三级在线| 春色校园综合激情亚洲| 国产一区二区精品久久| 久久91精品久久久久久秒播| 日韩av不卡一区二区| 91久久香蕉国产日韩欧美9色| 免费精品视频最新在线| 日日夜夜精品视频免费| 亚洲福利国产精品| 亚洲一二三级电影| 亚洲一区二区三区四区在线| 亚洲精品视频在线观看免费| 国产精品成人网| 国产精品动漫网站| 国产精品白丝在线| 国产精品久久国产精麻豆99网站| 中文子幕无线码一区tr| 欧美国产日韩精品免费观看| 国产日韩高清在线| 国产网站一区二区| 国产清纯白嫩初高生在线观看91| 国产亚洲婷婷免费| 国产精品污www在线观看| 欧美极品aⅴ影院| 国产精品热久久久久夜色精品三区| 天堂精品中文字幕在线| 亚洲色图欧美在线| 91精品国模一区二区三区| 678五月天丁香亚洲综合网| 欧美精品亚洲二区| 欧美一区二区精美| 欧美xxx久久| 国产日韩欧美在线一区| 中文字幕精品三区| 中文字幕欧美一| 亚洲人精品午夜| 一区二区三区蜜桃网| 色先锋资源久久综合| 91老师片黄在线观看| 91国产精品成人| 欧美色图免费看| 8x8x8国产精品| 精品久久久久久久久久久久久久久久久| 精品捆绑美女sm三区| 国产亚洲成年网址在线观看| 国产精品乱人伦| 一区二区三区精品在线观看| 香蕉乱码成人久久天堂爱免费| 美女免费视频一区| 国产精品456| 色综合视频在线观看| 欧美日韩亚洲不卡| 欧美xxxxxxxxx| 国产精品久久一级| 亚洲一区二区免费视频| 日韩高清在线一区| 国产大陆a不卡| 色欲综合视频天天天| 777a∨成人精品桃花网| 久久久久久影视| 亚洲视频一区在线观看| 视频一区二区国产| 国产成人午夜99999| 喷水一区二区三区| 国产成人丝袜美腿| 欧美日韩电影在线| 久久久久久久综合狠狠综合| 亚洲人成人一区二区在线观看 | 欧美日韩精品电影| 精品亚洲成a人| 久久综合综合久久综合| hitomi一区二区三区精品| 欧美视频一区二区三区四区| 精品国产乱码久久久久久久| 中文字幕一区二区三区精华液 | 亚洲一区在线视频| 久久99精品一区二区三区| 不卡免费追剧大全电视剧网站| 欧美美女网站色| 中文欧美字幕免费| 爽好多水快深点欧美视频| 国产丶欧美丶日本不卡视频| 欧美日韩国产片| 欧美国产97人人爽人人喊| 午夜国产精品一区| 成人av电影在线网| 日韩一区二区三区高清免费看看| 国产精品久久三区| 奇米四色…亚洲| 日本高清不卡视频| 久久免费看少妇高潮| 亚洲成人精品影院| 成人av在线资源| 日韩欧美国产综合| 亚洲精品欧美专区| 国产精品影音先锋| 欧美美女网站色| 亚洲丝袜精品丝袜在线| 国内精品视频一区二区三区八戒 | 色欲综合视频天天天| 久久久99免费| 日韩成人一区二区三区在线观看| 成人18视频在线播放| 久久只精品国产| 91视视频在线观看入口直接观看www| 在线精品视频免费播放| 久久久高清一区二区三区| 日韩电影在线免费看| 一本到三区不卡视频| 国产女同互慰高潮91漫画| 麻豆精品国产传媒mv男同| 欧洲一区在线电影| 国产精品久久久一本精品|