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

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

?? indexreader.java

?? lucene-2.4.0 是一個全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
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.document.Document;import org.apache.lucene.document.FieldSelector;import org.apache.lucene.search.Similarity;import org.apache.lucene.store.*;import java.io.File;import java.io.FileOutputStream;import java.io.IOException;import java.util.Arrays;import java.util.Collection;/** IndexReader is an abstract class, providing an interface for accessing an index.  Search of an index is done entirely through this abstract interface, so that any subclass which implements it is searchable. <p> Concrete subclasses of IndexReader are usually constructed with a call to one of the static <code>open()</code> methods, e.g. {@link #open(String)}. <p> For efficiency, in this API documents are often referred to via <i>document numbers</i>, non-negative integers which each name a unique document in the index.  These document numbers are ephemeral--they may change as documents are added to and deleted from an index.  Clients should thus not rely on a given document having the same number between sessions. <p> An IndexReader can be opened on a directory for which an IndexWriter is opened already, but it cannot be used to delete documents from the index then. <p> <b>NOTE</b>: for backwards API compatibility, several methods are not listed  as abstract, but have no useful implementations in this base class and  instead always throw UnsupportedOperationException.  Subclasses are  strongly encouraged to override these methods, but in many cases may not  need to. </p> <p> <b>NOTE</b>: as of 2.4, it's possible to open a read-only IndexReader using one of the static open methods that accepts the boolean readOnly parameter.  Such a reader has better concurrency as it's not necessary to synchronize on the isDeleted method.  Currently the default for readOnly is false, meaning if not specified you will get a read/write IndexReader.  But in 3.0 this default will change to true, meaning you must explicitly specify false if you want to make changes with the resulting IndexReader. </p> @version $Id: IndexReader.java 695510 2008-09-15 15:33:15Z otis $*/public abstract class IndexReader {  // NOTE: in 3.0 this will change to true  final static boolean READ_ONLY_DEFAULT = false;  /**   * Constants describing field properties, for example used for   * {@link IndexReader#getFieldNames(FieldOption)}.   */  public static final class FieldOption {    private String option;    private FieldOption() { }    private FieldOption(String option) {      this.option = option;    }    public String toString() {      return this.option;    }    /** All fields */    public static final FieldOption ALL = new FieldOption ("ALL");    /** All indexed fields */    public static final FieldOption INDEXED = new FieldOption ("INDEXED");    /** All fields that store payloads */    public static final FieldOption STORES_PAYLOADS = new FieldOption ("STORES_PAYLOADS");    /** All fields that omit tf */    public static final FieldOption OMIT_TF = new FieldOption ("OMIT_TF");    /** All fields which are not indexed */    public static final FieldOption UNINDEXED = new FieldOption ("UNINDEXED");    /** All fields which are indexed with termvectors enabled */    public static final FieldOption INDEXED_WITH_TERMVECTOR = new FieldOption ("INDEXED_WITH_TERMVECTOR");    /** All fields which are indexed but don't have termvectors enabled */    public static final FieldOption INDEXED_NO_TERMVECTOR = new FieldOption ("INDEXED_NO_TERMVECTOR");    /** All fields with termvectors enabled. Please note that only standard termvector fields are returned */    public static final FieldOption TERMVECTOR = new FieldOption ("TERMVECTOR");    /** All fields with termvectors with position values enabled */    public static final FieldOption TERMVECTOR_WITH_POSITION = new FieldOption ("TERMVECTOR_WITH_POSITION");    /** All fields with termvectors with offset values enabled */    public static final FieldOption TERMVECTOR_WITH_OFFSET = new FieldOption ("TERMVECTOR_WITH_OFFSET");    /** All fields with termvectors with offset values and position values enabled */    public static final FieldOption TERMVECTOR_WITH_POSITION_OFFSET = new FieldOption ("TERMVECTOR_WITH_POSITION_OFFSET");  }  private boolean closed;  protected boolean hasChanges;    private volatile int refCount;    // for testing  synchronized int getRefCount() {    return refCount;  }    /**   * Expert: increments the refCount of this IndexReader   * instance.  RefCounts are used to determine when a   * reader can be closed safely, i.e. as soon as there are   * no more references.  Be sure to always call a   * corresponding {@link #decRef}, in a finally clause;   * otherwise the reader may never be closed.  Note that   * {@link #close} simply calls decRef(), which means that   * the IndexReader will not really be closed until {@link   * #decRef} has been called for all outstanding   * references.   *   * @see #decRef   */  public synchronized void incRef() {    assert refCount > 0;    ensureOpen();    refCount++;  }  /**   * Expert: decreases the refCount of this IndexReader   * instance.  If the refCount drops to 0, then pending   * changes (if any) are committed to the index and this   * reader is closed.   *    * @throws IOException in case an IOException occurs in commit() or doClose()   *   * @see #incRef   */  public synchronized void decRef() throws IOException {    assert refCount > 0;    ensureOpen();    if (refCount == 1) {      commit();      doClose();    }    refCount--;  }    /**    * @deprecated will be deleted when IndexReader(Directory) is deleted   * @see #directory()   */  private Directory directory;  /**   * Legacy Constructor for backwards compatibility.   *   * <p>   * This Constructor should not be used, it exists for backwards    * compatibility only to support legacy subclasses that did not "own"    * a specific directory, but needed to specify something to be returned    * by the directory() method.  Future subclasses should delegate to the    * no arg constructor and implement the directory() method as appropriate.   *    * @param directory Directory to be returned by the directory() method   * @see #directory()   * @deprecated - use IndexReader()   */  protected IndexReader(Directory directory) {    this();    this.directory = directory;  }    protected IndexReader() {     refCount = 1;  }    /**   * @throws AlreadyClosedException if this IndexReader is closed   */  protected final void ensureOpen() throws AlreadyClosedException {    if (refCount <= 0) {      throw new AlreadyClosedException("this IndexReader is closed");    }  }  /** Returns a read/write IndexReader reading the index in an FSDirectory in the named   path.  <b>NOTE</b>: starting in 3.0 this will return a readOnly IndexReader.   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   * @param path the path to the index directory */  public static IndexReader open(String path) throws CorruptIndexException, IOException {    return open(FSDirectory.getDirectory(path), true, null, null, READ_ONLY_DEFAULT);  }  /** Returns a read/write IndexReader reading the index in an FSDirectory in the named   * path.  <b>NOTE</b>: starting in 3.0 this will return a readOnly IndexReader.   * @param path the path to the index directory   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(File path) throws CorruptIndexException, IOException {    return open(FSDirectory.getDirectory(path), true, null, null, READ_ONLY_DEFAULT);  }  /** Returns a read/write IndexReader reading the index in   * the given Directory. <b>NOTE</b>: starting in 3.0 this   * will return a readOnly IndexReader.   * @param directory the index directory   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final Directory directory) throws CorruptIndexException, IOException {    return open(directory, false, null, null, READ_ONLY_DEFAULT);  }  /** Returns a read/write or read only IndexReader reading the index in the given Directory.   * @param directory the index directory   * @param readOnly true if no changes (deletions, norms) will be made with this IndexReader   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final Directory directory, boolean readOnly) throws CorruptIndexException, IOException {    return open(directory, false, null, null, readOnly);  }  /** Expert: returns a read/write IndexReader reading the index in the given   * {@link IndexCommit}.  <b>NOTE</b>: starting in 3.0 this   * will return a readOnly IndexReader.   * @param commit the commit point to open   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final IndexCommit commit) throws CorruptIndexException, IOException {    return open(commit.getDirectory(), false, null, commit, READ_ONLY_DEFAULT);  }  /** Expert: returns a read/write IndexReader reading the index in the given   * Directory, with a custom {@link IndexDeletionPolicy}.   * <b>NOTE</b>: starting in 3.0 this will return a   * readOnly IndexReader.   * @param directory the index directory   * @param deletionPolicy a custom deletion policy (only used   *  if you use this reader to perform deletes or to set   *  norms); see {@link IndexWriter} for details.   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final Directory directory, IndexDeletionPolicy deletionPolicy) throws CorruptIndexException, IOException {    return open(directory, false, deletionPolicy, null, READ_ONLY_DEFAULT);  }  /** Expert: returns a read/write or read only IndexReader reading the index in the given   * Directory, with a custom {@link IndexDeletionPolicy}.   * <b>NOTE</b>: starting in 3.0 this will return a   * readOnly IndexReader.   * @param directory the index directory   * @param deletionPolicy a custom deletion policy (only used   *  if you use this reader to perform deletes or to set   *  norms); see {@link IndexWriter} for details.   * @param readOnly true if no changes (deletions, norms) will be made with this IndexReader   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly) throws CorruptIndexException, IOException {    return open(directory, false, deletionPolicy, null, readOnly);  }  /** Expert: returns a read/write IndexReader reading the index in the given   * Directory, using a specific commit and with a custom   * {@link IndexDeletionPolicy}.  <b>NOTE</b>: starting in   * 3.0 this will return a readOnly IndexReader.   * @param commit the specific {@link IndexCommit} to open;   * see {@link IndexReader#listCommits} to list all commits   * in a directory   * @param deletionPolicy a custom deletion policy (only used   *  if you use this reader to perform deletes or to set   *  norms); see {@link IndexWriter} for details.   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final IndexCommit commit, IndexDeletionPolicy deletionPolicy) throws CorruptIndexException, IOException {    return open(commit.getDirectory(), false, deletionPolicy, commit, READ_ONLY_DEFAULT);  }  /** Expert: returns a read/write or read only IndexReader reading the index in the given   * Directory, using a specific commit and with a custom {@link IndexDeletionPolicy}.   * @param commit the specific {@link IndexCommit} to open;   * see {@link IndexReader#listCommits} to list all commits   * in a directory   * @param deletionPolicy a custom deletion policy (only used   *  if you use this reader to perform deletes or to set   *  norms); see {@link IndexWriter} for details.   * @param readOnly true if no changes (deletions, norms) will be made with this IndexReader   * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */  public static IndexReader open(final IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly) throws CorruptIndexException, IOException {    return open(commit.getDirectory(), false, deletionPolicy, commit, readOnly);  }  private static IndexReader open(final Directory directory, final boolean closeDirectory, final IndexDeletionPolicy deletionPolicy, final IndexCommit commit, final boolean readOnly) throws CorruptIndexException, IOException {    return DirectoryIndexReader.open(directory, closeDirectory, deletionPolicy, commit, readOnly);  }  /**   * Refreshes an IndexReader if the index has changed since this instance    * was (re)opened.    * <p>   * Opening an IndexReader is an expensive operation. This method can be used   * to refresh an existing IndexReader to reduce these costs. This method    * tries to only load segments that have changed or were created after the    * IndexReader was (re)opened.   * <p>   * If the index has not changed since this instance was (re)opened, then this   * call is a NOOP and returns this instance. Otherwise, a new instance is    * returned. The old instance is <b>not</b> closed and remains usable.<br>   * <b>Note:</b> The re-opened reader instance and the old instance might share   * the same resources. For this reason no index modification operations    * (e. g. {@link #deleteDocument(int)}, {@link #setNorm(int, String, byte)})    * should be performed using one of the readers until the old reader instance   * is closed. <b>Otherwise, the behavior of the readers is undefined.</b>    * <p>      * You can determine whether a reader was actually reopened by comparing the   * old instance with the instance returned by this method:    * <pre>   * IndexReader reader = ...    * ...   * IndexReader new = r.reopen();   * if (new != reader) {   *   ...     // reader was reopened   *   reader.close();    * }   * reader = new;   * ...   * </pre>   *    * @throws CorruptIndexException if the index is corrupt   * @throws IOException if there is a low-level IO error   */    public synchronized IndexReader reopen() throws CorruptIndexException, IOException {    throw new UnsupportedOperationException("This reader does not support reopen().");  }  /**    * Returns the directory associated with this index.  The Default    * implementation returns the directory specified by subclasses when    * delegating to the IndexReader(Directory) constructor, or throws an    * UnsupportedOperationException if one was not specified.   * @throws UnsupportedOperationException if no directory   */  public Directory directory() {    ensureOpen();    if (null != directory) {      return directory;    } else {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
337p亚洲精品色噜噜| 日韩精品中文字幕一区| 欧美一级片免费看| 国产精品毛片无遮挡高清| 午夜精品福利久久久| 成年人国产精品| 26uuu另类欧美亚洲曰本| 亚洲电影一级黄| 91免费看`日韩一区二区| 久久精品人人做人人爽人人| 日韩av一二三| 欧美性大战久久久| 亚洲视频一区二区在线| 国产福利一区在线| 精品国产乱码久久久久久久久| 亚洲成人第一页| 在线视频你懂得一区| 中文字幕高清一区| 国产高清成人在线| 国产亚洲精久久久久久| 久久精品二区亚洲w码| 欧美日韩精品欧美日韩精品一综合| 亚洲欧美日韩国产中文在线| 国产精品一色哟哟哟| 精品成人免费观看| 精品在线亚洲视频| 精品国产免费人成在线观看| 男人的j进女人的j一区| 3751色影院一区二区三区| 日韩主播视频在线| 91精品一区二区三区在线观看| 午夜久久久久久久久久一区二区| 色婷婷综合激情| 亚洲aaa精品| 91精品福利在线一区二区三区 | 成人性生交大片免费看中文| 国产亚洲美州欧州综合国| 国产在线国偷精品免费看| 精品久久久影院| 精品一区二区三区久久久| 精品va天堂亚洲国产| 国产乱码精品一品二品| 国产精品系列在线| 99久久er热在这里只有精品66| 专区另类欧美日韩| 欧亚洲嫩模精品一区三区| 亚洲国产婷婷综合在线精品| 3atv一区二区三区| 国产精品一区二区男女羞羞无遮挡 | 波波电影院一区二区三区| 专区另类欧美日韩| 欧美疯狂性受xxxxx喷水图片| 免费高清视频精品| 精品日韩欧美一区二区| 成人爽a毛片一区二区免费| 中文字幕制服丝袜一区二区三区 | voyeur盗摄精品| 一区二区三区日韩在线观看| 欧美日韩国产首页| 久久精品国产网站| 成人免费一区二区三区在线观看 | 亚洲综合清纯丝袜自拍| 欧美一区二区视频在线观看 | 色噜噜夜夜夜综合网| 首页国产欧美久久| 日韩三区在线观看| 成人精品电影在线观看| 亚洲va欧美va天堂v国产综合| 久久精品视频一区二区三区| 欧美视频在线一区二区三区| 国模冰冰炮一区二区| 亚洲福中文字幕伊人影院| 精品免费国产一区二区三区四区| 97久久精品人人澡人人爽| 蜜臀久久久99精品久久久久久| 国产精品色哟哟| 日韩一二三四区| 色婷婷狠狠综合| 国产乱码字幕精品高清av| 午夜精品福利一区二区三区蜜桃| 久久九九久精品国产免费直播| 欧美性色aⅴ视频一区日韩精品| 国产一区二区导航在线播放| 亚洲成人第一页| 1000精品久久久久久久久| 2020国产精品自拍| 欧美日韩亚洲不卡| 成人免费视频app| 狠狠色丁香久久婷婷综| 亚洲一区免费观看| 成人免费一区二区三区视频 | 日韩一区二区三区高清免费看看| 一本到不卡精品视频在线观看| 激情欧美一区二区三区在线观看| 亚洲国产精品久久久久婷婷884 | 美女国产一区二区三区| 亚洲午夜av在线| 亚洲精品成人精品456| 中文字幕精品一区二区三区精品| 日韩欧美一区中文| 欧美精品久久99| 欧美日韩一级片在线观看| 91在线你懂得| 91免费看视频| 91欧美一区二区| 99re视频精品| 91在线观看成人| 高清久久久久久| 成人黄色777网| 成人免费视频一区二区| 国产成人av自拍| 国产成人精品三级麻豆| 国产精品自拍三区| 国产精品亚洲第一区在线暖暖韩国 | www.av精品| 国产成人精品综合在线观看 | 日韩精彩视频在线观看| 亚洲18色成人| 免费看欧美女人艹b| 麻豆91在线看| 国产麻豆成人精品| 懂色一区二区三区免费观看| 国产精品1区二区.| 国产乱码精品一区二区三区av | 看片的网站亚洲| 激情综合五月天| 丰满放荡岳乱妇91ww| av影院午夜一区| 在线视频观看一区| 欧美日韩大陆一区二区| 欧美一区二区啪啪| 久久嫩草精品久久久久| 日本一区二区成人在线| 亚洲免费在线观看| 午夜婷婷国产麻豆精品| 日本v片在线高清不卡在线观看| 久久99国产乱子伦精品免费| 成人污污视频在线观看| 91在线观看成人| 欧美日韩和欧美的一区二区| 日韩午夜三级在线| 国产精品网曝门| 亚洲高清在线精品| 国产精品亚洲一区二区三区妖精 | 久久这里只有精品首页| 中文字幕在线观看不卡视频| 夜色激情一区二区| 美女视频第一区二区三区免费观看网站| 国产乱码精品一区二区三区五月婷| 国产.欧美.日韩| 欧美美女bb生活片| 国产区在线观看成人精品| 亚洲一区二区在线观看视频| 久久99精品久久久| 91美女片黄在线观看91美女| 日韩女优视频免费观看| 亚洲国产精品高清| 日本v片在线高清不卡在线观看| 丁香激情综合国产| 91麻豆精品91久久久久同性| 欧美国产视频在线| 日韩电影在线观看网站| av在线播放一区二区三区| 日韩小视频在线观看专区| 亚洲欧美日韩一区| 国产大片一区二区| 欧美日韩国产中文| 日韩理论片网站| 国产一区福利在线| 欧美日本国产视频| 国产精品久久久久影院老司 | 一个色在线综合| 岛国一区二区在线观看| 欧美一区二区私人影院日本| 国产精品久久久久久久久免费樱桃| 日本人妖一区二区| 欧美日免费三级在线| 国产精品久久久久一区二区三区 | 欧美精品一区二区三区久久久| 一区二区三区日韩欧美| 成人小视频免费在线观看| 欧美刺激脚交jootjob| 无码av中文一区二区三区桃花岛| gogogo免费视频观看亚洲一| 久久久91精品国产一区二区精品 | 日韩一级片网址| 日韩不卡在线观看日韩不卡视频| 一本大道久久a久久精二百| 国产亚洲午夜高清国产拍精品| 蜜臀久久久99精品久久久久久| 欧美视频完全免费看| 亚洲三级免费观看| 99热这里都是精品| 国产精品视频免费看| 国产一区二区精品久久99| 精品第一国产综合精品aⅴ| 精品一区二区在线视频| 精品国产乱码久久久久久浪潮 | 亚洲国产精品尤物yw在线观看| 91丨九色丨蝌蚪富婆spa|