亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美午夜一区二区三区 | 一本久道久久综合中文字幕| 久久久精品欧美丰满| 国产中文一区二区三区| 精品国产伦一区二区三区观看方式| 亚洲国产综合人成综合网站| 欧美视频自拍偷拍| 天天操天天干天天综合网| 制服丝袜在线91| 美女www一区二区| 欧美v日韩v国产v| 国产精品一区二区黑丝| 国产精品久久夜| 一本大道久久a久久综合| 亚洲国产综合人成综合网站| 日韩欧美一区二区免费| 国产一区二区三区电影在线观看| 久久久久久毛片| 色综合一个色综合亚洲| 天堂va蜜桃一区二区三区漫画版| 欧美一区二区三级| 国产馆精品极品| 一区二区三区四区五区视频在线观看 | 亚洲国产成人在线| 91视频精品在这里| 丝袜美腿亚洲色图| 欧美国产欧美综合| 欧美三级三级三级| 国产一区二区0| 一区二区三区小说| 精品久久一区二区| 色久综合一二码| 狠狠色丁香婷婷综合| 亚洲欧美日韩在线不卡| 日韩视频在线你懂得| 成人福利在线看| 日韩中文字幕av电影| 欧美激情在线看| 在线电影国产精品| 成人免费毛片app| 蜜臀91精品一区二区三区| 中文字幕色av一区二区三区| 91麻豆精品国产91久久久久| 99re在线视频这里只有精品| 久久99精品久久久久| 亚洲精品网站在线观看| 久久久久久久久久久久久久久99 | 中文字幕视频一区二区三区久| 欧美精选在线播放| aaa欧美大片| 精品一区二区三区免费播放| 亚洲一区二区三区视频在线播放| 国产欧美一二三区| 日韩视频一区在线观看| 91视频国产观看| 丰满少妇在线播放bd日韩电影| 美日韩一级片在线观看| 一区二区三区四区在线免费观看 | 日韩一区二区三区四区| 色哟哟一区二区在线观看| 国产综合色视频| 蜜臀精品一区二区三区在线观看| 亚洲你懂的在线视频| 国产三级精品在线| wwww国产精品欧美| 日韩欧美一区中文| 欧美日韩久久一区二区| 97久久精品人人做人人爽50路| 国产精品一二三四区| 国产综合久久久久久鬼色 | 亚洲一级电影视频| 中文字幕一区二区三区四区不卡 | 91精品国产麻豆国产自产在线 | 欧美日韩高清在线播放| 色婷婷精品久久二区二区蜜臀av | 美女在线视频一区| 免费看精品久久片| 久久精品国产亚洲高清剧情介绍| 午夜a成v人精品| 亚洲一区免费视频| 激情欧美一区二区三区在线观看| 亚洲综合成人在线视频| 亚洲日本va午夜在线影院| 亚洲欧洲日韩一区二区三区| 久久久精品tv| 亚洲国产成人在线| 亚洲欧洲一区二区在线播放| 国产精品国产三级国产a| 成人免费小视频| 一区二区三区四区五区视频在线观看| 亚洲精品亚洲人成人网| 午夜av电影一区| 麻豆精品久久精品色综合| 久久精品国产在热久久| 国产精品一区二区无线| 成人黄页毛片网站| 91亚洲资源网| 欧美日韩视频专区在线播放| 欧美女孩性生活视频| 欧美不卡一二三| 国产精品丝袜一区| 尤物视频一区二区| 免费在线看一区| 国内精品第一页| 99久久精品久久久久久清纯| 色成人在线视频| 777色狠狠一区二区三区| 日韩一卡二卡三卡国产欧美| 久久精品夜夜夜夜久久| 亚洲精品成人在线| 日本欧美肥老太交大片| 国产精品一区二区果冻传媒| 99re亚洲国产精品| 69av一区二区三区| 国产精品三级av在线播放| 亚洲精品成人在线| 精品午夜一区二区三区在线观看| 成人aa视频在线观看| 69堂成人精品免费视频| 国产精品久久99| 性久久久久久久久久久久| 国产在线精品免费| 91国内精品野花午夜精品 | 亚洲国产精品黑人久久久| 亚洲国产日韩精品| 国内国产精品久久| 欧美在线不卡视频| 中文字幕av一区二区三区| 亚洲成av人片在线观看| 国产经典欧美精品| 欧美日韩激情在线| 中文字幕在线一区免费| 日韩中文字幕av电影| 成人激情视频网站| 欧美成人精品3d动漫h| 亚洲免费伊人电影| 高清不卡在线观看av| 6080国产精品一区二区| 亚洲欧洲在线观看av| 韩国一区二区三区| 欧美日韩国产一二三| 亚洲蜜臀av乱码久久精品蜜桃| 国产一区二区三区综合| 666欧美在线视频| 一区二区三区加勒比av| 国产成人亚洲精品青草天美| 51久久夜色精品国产麻豆| 亚洲精品欧美激情| 成人久久18免费网站麻豆 | 91精品蜜臀在线一区尤物| 亚洲欧洲一区二区三区| 国产乱码一区二区三区| 日韩欧美国产麻豆| 日韩福利视频导航| 91福利在线导航| 综合久久久久久| 99久久精品免费看国产免费软件| 亚洲国产精品99久久久久久久久| 麻豆成人免费电影| 日韩精品专区在线影院重磅| 婷婷综合五月天| 欧美精品tushy高清| 亚洲一区二区免费视频| 91激情五月电影| 一个色妞综合视频在线观看| 91久久精品国产91性色tv| 日韩理论电影院| 99精品一区二区三区| 中文字幕精品一区二区精品绿巨人| 精久久久久久久久久久| 精品毛片乱码1区2区3区| 麻豆极品一区二区三区| 日韩精品一区二区三区视频播放| 日本欧美大码aⅴ在线播放| 欧美一区二区免费观在线| 亚洲1区2区3区4区| 欧美一区二区三区爱爱| 久久国产乱子精品免费女| 欧美电视剧免费观看| 韩国一区二区视频| 国产精品视频一区二区三区不卡| 国产高清久久久久| 欧美国产综合色视频| 大胆亚洲人体视频| 亚洲色欲色欲www| 精品视频999| 久久99精品国产麻豆不卡| 久久天堂av综合合色蜜桃网 | 不卡av在线免费观看| 椎名由奈av一区二区三区| 在线观看亚洲a| 视频一区二区三区在线| 日韩西西人体444www| 韩国午夜理伦三级不卡影院| 国产精品网站在线观看| 日本道精品一区二区三区| 日韩精品免费专区| 国产喂奶挤奶一区二区三区| 97国产一区二区| 五月天一区二区|