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

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

?? fieldinfos.java

?? lucene完整源碼
?? JAVA
字號:
package org.apache.lucene.index;/** * Copyright 2004 The Apache Software Foundation * * Licensed 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.util.*;import java.io.IOException;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.store.Directory;import org.apache.lucene.store.IndexOutput;import org.apache.lucene.store.IndexInput;/** Access to the Field Info file that describes document fields and whether or *  not they are indexed. Each segment has a separate Field Info file. Objects *  of this class are thread-safe for multiple readers, but only one thread can *  be adding documents at a time, with no other reader or writer threads *  accessing this object. */final class FieldInfos {    static final byte IS_INDEXED = 0x1;  static final byte STORE_TERMVECTOR = 0x2;  static final byte STORE_POSITIONS_WITH_TERMVECTOR = 0x4;  static final byte STORE_OFFSET_WITH_TERMVECTOR = 0x8;  static final byte OMIT_NORMS = 0x10;    private ArrayList byNumber = new ArrayList();  private HashMap byName = new HashMap();  FieldInfos() { }  /**   * Construct a FieldInfos object using the directory and the name of the file   * IndexInput   * @param d The directory to open the IndexInput from   * @param name The name of the file to open the IndexInput from in the Directory   * @throws IOException   */  FieldInfos(Directory d, String name) throws IOException {    IndexInput input = d.openInput(name);    try {      read(input);    } finally {      input.close();    }  }  /** Adds field info for a Document. */  public void add(Document doc) {    Enumeration fields = doc.fields();    while (fields.hasMoreElements()) {      Field field = (Field) fields.nextElement();      add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(),              field.isStoreOffsetWithTermVector(), field.getOmitNorms());    }  }    /**   * Add fields that are indexed. Whether they have termvectors has to be specified.   *    * @param names The names of the fields   * @param storeTermVectors Whether the fields store term vectors or not   * @param storePositionWithTermVector treu if positions should be stored.   * @param storeOffsetWithTermVector true if offsets should be stored   */  public void addIndexed(Collection names, boolean storeTermVectors, boolean storePositionWithTermVector,                          boolean storeOffsetWithTermVector) {    Iterator i = names.iterator();    while (i.hasNext()) {      add((String)i.next(), true, storeTermVectors, storePositionWithTermVector, storeOffsetWithTermVector);    }  }  /**   * Assumes the fields are not storing term vectors.   *    * @param names The names of the fields   * @param isIndexed Whether the fields are indexed or not   *    * @see #add(String, boolean)   */  public void add(Collection names, boolean isIndexed) {    Iterator i = names.iterator();    while (i.hasNext()) {      add((String)i.next(), isIndexed);    }  }  /**   * Calls 5 parameter add with false for all TermVector parameters.   *    * @param name The name of the Field   * @param isIndexed true if the field is indexed   * @see #add(String, boolean, boolean, boolean, boolean)   */  public void add(String name, boolean isIndexed) {    add(name, isIndexed, false, false, false, false);  }  /**   * Calls 5 parameter add with false for term vector positions and offsets.   *    * @param name The name of the field   * @param isIndexed  true if the field is indexed   * @param storeTermVector true if the term vector should be stored   */  public void add(String name, boolean isIndexed, boolean storeTermVector){    add(name, isIndexed, storeTermVector, false, false, false);  }    /** If the field is not yet known, adds it. If it is known, checks to make   *  sure that the isIndexed flag is the same as was given previously for this   *  field. If not - marks it as being indexed.  Same goes for the TermVector   * parameters.   *    * @param name The name of the field   * @param isIndexed true if the field is indexed   * @param storeTermVector true if the term vector should be stored   * @param storePositionWithTermVector true if the term vector with positions should be stored   * @param storeOffsetWithTermVector true if the term vector with offsets should be stored   */  public void add(String name, boolean isIndexed, boolean storeTermVector,                  boolean storePositionWithTermVector, boolean storeOffsetWithTermVector) {    add(name, isIndexed, storeTermVector, storePositionWithTermVector, storeOffsetWithTermVector, false);  }    /** If the field is not yet known, adds it. If it is known, checks to make   *  sure that the isIndexed flag is the same as was given previously for this   *  field. If not - marks it as being indexed.  Same goes for the TermVector   * parameters.   *   * @param name The name of the field   * @param isIndexed true if the field is indexed   * @param storeTermVector true if the term vector should be stored   * @param storePositionWithTermVector true if the term vector with positions should be stored   * @param storeOffsetWithTermVector true if the term vector with offsets should be stored   * @param omitNorms true if the norms for the indexed field should be omitted   */  public void add(String name, boolean isIndexed, boolean storeTermVector,                  boolean storePositionWithTermVector, boolean storeOffsetWithTermVector, boolean omitNorms) {    FieldInfo fi = fieldInfo(name);    if (fi == null) {      addInternal(name, isIndexed, storeTermVector, storePositionWithTermVector, storeOffsetWithTermVector, omitNorms);    } else {      if (fi.isIndexed != isIndexed) {        fi.isIndexed = true;                      // once indexed, always index      }      if (fi.storeTermVector != storeTermVector) {        fi.storeTermVector = true;                // once vector, always vector      }      if (fi.storePositionWithTermVector != storePositionWithTermVector) {        fi.storePositionWithTermVector = true;                // once vector, always vector      }      if (fi.storeOffsetWithTermVector != storeOffsetWithTermVector) {        fi.storeOffsetWithTermVector = true;                // once vector, always vector      }      if (fi.omitNorms != omitNorms) {        fi.omitNorms = false;                // once norms are stored, always store      }    }  }  private void addInternal(String name, boolean isIndexed,                           boolean storeTermVector, boolean storePositionWithTermVector,                            boolean storeOffsetWithTermVector, boolean omitNorms) {    FieldInfo fi =      new FieldInfo(name, isIndexed, byNumber.size(), storeTermVector, storePositionWithTermVector,              storeOffsetWithTermVector, omitNorms);    byNumber.add(fi);    byName.put(name, fi);  }  public int fieldNumber(String fieldName) {    try {      FieldInfo fi = fieldInfo(fieldName);      if (fi != null)        return fi.number;    }    catch (IndexOutOfBoundsException ioobe) {      return -1;    }    return -1;  }  public FieldInfo fieldInfo(String fieldName) {    return (FieldInfo) byName.get(fieldName);  }  /**   * Return the fieldName identified by its number.   *    * @param fieldNumber   * @return the fieldName or an empty string when the field   * with the given number doesn't exist.   */    public String fieldName(int fieldNumber) {    try {      return fieldInfo(fieldNumber).name;    }    catch (NullPointerException npe) {      return "";    }  }  /**   * Return the fieldinfo object referenced by the fieldNumber.   * @param fieldNumber   * @return the FieldInfo object or null when the given fieldNumber   * doesn't exist.   */    public FieldInfo fieldInfo(int fieldNumber) {    try {      return (FieldInfo) byNumber.get(fieldNumber);    }    catch (IndexOutOfBoundsException ioobe) {      return null;    }  }  public int size() {    return byNumber.size();  }  public boolean hasVectors() {    boolean hasVectors = false;    for (int i = 0; i < size(); i++) {      if (fieldInfo(i).storeTermVector) {        hasVectors = true;        break;      }    }    return hasVectors;  }  public void write(Directory d, String name) throws IOException {    IndexOutput output = d.createOutput(name);    try {      write(output);    } finally {      output.close();    }  }  public void write(IndexOutput output) throws IOException {    output.writeVInt(size());    for (int i = 0; i < size(); i++) {      FieldInfo fi = fieldInfo(i);      byte bits = 0x0;      if (fi.isIndexed) bits |= IS_INDEXED;      if (fi.storeTermVector) bits |= STORE_TERMVECTOR;      if (fi.storePositionWithTermVector) bits |= STORE_POSITIONS_WITH_TERMVECTOR;      if (fi.storeOffsetWithTermVector) bits |= STORE_OFFSET_WITH_TERMVECTOR;      if (fi.omitNorms) bits |= OMIT_NORMS;      output.writeString(fi.name);      output.writeByte(bits);    }  }  private void read(IndexInput input) throws IOException {    int size = input.readVInt();//read in the size    for (int i = 0; i < size; i++) {      String name = input.readString().intern();      byte bits = input.readByte();      boolean isIndexed = (bits & IS_INDEXED) != 0;      boolean storeTermVector = (bits & STORE_TERMVECTOR) != 0;      boolean storePositionsWithTermVector = (bits & STORE_POSITIONS_WITH_TERMVECTOR) != 0;      boolean storeOffsetWithTermVector = (bits & STORE_OFFSET_WITH_TERMVECTOR) != 0;      boolean omitNorms = (bits & OMIT_NORMS) != 0;      addInternal(name, isIndexed, storeTermVector, storePositionsWithTermVector, storeOffsetWithTermVector, omitNorms);    }      }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久久久| 欧洲精品在线观看| 日韩美女精品在线| 欧美一级片在线观看| 不卡的av在线播放| 蜜臀av一区二区在线观看| 欧美激情中文不卡| 91精品婷婷国产综合久久| 成a人片国产精品| 男人的j进女人的j一区| 一区二区三区中文字幕精品精品 | 麻豆精品蜜桃视频网站| 亚洲欧洲精品一区二区精品久久久| 欧美日韩一区二区三区高清| 成人网在线免费视频| 午夜欧美电影在线观看| 中文字幕一区二区三区av| 欧美大片拔萝卜| 6080yy午夜一二三区久久| 91免费视频网址| 国产成人免费高清| 奇米色一区二区| 亚洲成av人影院| 一区二区在线观看免费| 亚洲欧洲精品天堂一级| 国产视频不卡一区| 久久众筹精品私拍模特| 欧美一区二区精美| 欧美精品视频www在线观看| 91天堂素人约啪| 成人激情午夜影院| 国产iv一区二区三区| 久久精品国产99| 毛片一区二区三区| 日本人妖一区二区| 日本中文一区二区三区| 午夜不卡av免费| 午夜久久久久久久久| 亚洲成人av资源| 亚洲国产精品精华液网站| 一片黄亚洲嫩模| 一区二区久久久久| 亚洲一区二区在线免费观看视频 | 欧美高清性hdvideosex| 91福利在线观看| 在线观看www91| 欧美日韩综合不卡| 欧美日韩国产经典色站一区二区三区 | 狠狠色综合播放一区二区| 91视频xxxx| 国产激情91久久精品导航| 国产成人综合精品三级| 丰满亚洲少妇av| 99久久精品国产一区二区三区| 9色porny自拍视频一区二区| 91天堂素人约啪| 欧美日韩另类一区| 欧美一级欧美三级| 欧美v亚洲v综合ⅴ国产v| 久久综合九色综合欧美亚洲| 国产亚洲欧美激情| 亚洲天堂免费看| 亚洲午夜在线视频| 日本人妖一区二区| 国产成人综合精品三级| 91婷婷韩国欧美一区二区| 欧美日韩精品一区二区三区四区 | 精品国产污污免费网站入口| 国产丝袜在线精品| 亚洲精品v日韩精品| 日日摸夜夜添夜夜添精品视频| 欧美aaa在线| 成人a区在线观看| 色狠狠桃花综合| 欧美一级二级三级蜜桃| 国产日韩高清在线| 亚洲精品国产一区二区三区四区在线| 亚洲自拍与偷拍| 精品制服美女丁香| 97成人超碰视| 91精品久久久久久久久99蜜臂| 精品99一区二区| 综合久久一区二区三区| 免费在线观看一区| 99精品国产视频| 日韩一区二区麻豆国产| 国产精品成人一区二区三区夜夜夜| 一区二区三区小说| 狠狠色狠狠色综合系列| 色欧美88888久久久久久影院| 91精品国产欧美一区二区| 国产精品久久久99| 日本麻豆一区二区三区视频| 成人一区二区三区在线观看| 欧美日韩一区三区四区| 久久久无码精品亚洲日韩按摩| 亚洲综合在线免费观看| 国产精品一线二线三线| 欧美日韩高清一区二区三区| 国产精品色呦呦| 久88久久88久久久| 欧美日韩日日夜夜| 亚洲人亚洲人成电影网站色| 久久成人av少妇免费| 欧美私模裸体表演在线观看| 国产精品午夜久久| 欧美日韩国产成人在线91| 欧美极品aⅴ影院| 免费久久99精品国产| 91久久香蕉国产日韩欧美9色| 久久久久国产免费免费| 日产精品久久久久久久性色| 欧美综合亚洲图片综合区| 日本一区二区三区电影| 韩国女主播一区二区三区| 欧美日韩免费不卡视频一区二区三区| 国产精品五月天| 国产黄人亚洲片| 精品久久久久久久久久久院品网| 亚洲福利视频三区| 91在线porny国产在线看| 久久综合丝袜日本网| 蜜桃久久久久久| 欧美日韩亚洲综合一区 | 亚洲精品视频在线观看免费| 国产精品一区二区在线看| 精品日韩成人av| 美女在线视频一区| 欧美福利视频一区| 香蕉久久夜色精品国产使用方法| 91免费在线视频观看| 亚洲精品免费在线| 91在线无精精品入口| 亚洲三级电影网站| 91在线观看成人| 亚洲激情校园春色| 一本一道综合狠狠老| 亚洲欧美一区二区三区孕妇| av一区二区三区黑人| 国产精品素人一区二区| 风间由美一区二区av101| 久久综合国产精品| 国产ts人妖一区二区| 国产精品入口麻豆九色| 成人福利在线看| 国产精品欧美久久久久一区二区| 成人精品gif动图一区| 成人欧美一区二区三区白人| 91丨porny丨国产| 亚洲午夜精品久久久久久久久| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲免费在线观看视频| 在线观看91精品国产入口| 亚洲444eee在线观看| 91精品国产麻豆国产自产在线 | 中文字幕日韩av资源站| 91美女在线看| 图片区小说区国产精品视频| 欧美一级搡bbbb搡bbbb| 国产麻豆日韩欧美久久| 国产精品久久久爽爽爽麻豆色哟哟| 91在线观看成人| 亚洲444eee在线观看| 久久综合99re88久久爱| 91小视频免费观看| 日韩精品一二三| 国产亚洲自拍一区| 91免费在线播放| 麻豆精品一区二区| 亚洲视频一区二区免费在线观看| 日本久久电影网| 久久爱另类一区二区小说| 国产精品麻豆一区二区| 欧美色图天堂网| 国产一区视频在线看| 最近中文字幕一区二区三区| 欧美高清你懂得| 粉嫩13p一区二区三区| 亚洲成人在线网站| 国产日韩影视精品| 欧美日韩高清一区二区三区| 国产成人在线影院| 亚洲电影在线播放| 国产视频一区不卡| 欧美丰满嫩嫩电影| 不卡一卡二卡三乱码免费网站| 亚洲高清不卡在线| 国产精品福利在线播放| 日韩一区二区中文字幕| 一本一本大道香蕉久在线精品| 亚洲精品成人在线| 2021国产精品久久精品| 欧美午夜在线观看| 国产成人精品免费视频网站| 午夜精品一区二区三区电影天堂 | 欧美三级视频在线播放| 国产91精品久久久久久久网曝门| 日韩欧美黄色影院| 成人一级黄色片| 日韩高清在线电影|