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

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

?? fieldfilter.java

?? 個(gè)人Blog java編寫的Blog可以直接使用!
?? JAVA
字號(hào):
/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
package com.liusoft.dlog4j.search;

import java.io.IOException;
import java.util.BitSet;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;

/**
 * A Filter that restricts search results to Documents that match a set of
 * specified Field values.
 *
 * For example, suppose you create a search index to make your catalog of widgets
 * searchable. When indexing, you add a field to each Document called "color"
 * that has one of the following values: "blue", "green", "yellow", or "red".
 * Now suppose that a user is executing a query but only wants to see green
 * widgets in the results. The following code snippet yields that behavior:
 * <pre>
 *     //In this example, we assume the Searcher and Query are already defined.
 *     //Define a FieldFilter to only show green colored widgets.
 *     Field myFilter = new FieldFilter("color", "green");
 *     Hits queryResults = mySearcher.execute(myQuery, myFilter);
 * </pre>
 *
 * @author Matt Tucker (matt@coolservlets.com)
 */
public class FieldFilter extends org.apache.lucene.search.Filter {

	private Term [] searchTerms;

    /**
     * Creates a new field filter. The name of the field and the values to filter
     * on are specified. In order for a Document to pass this filter, it must:
     * <ol>
     *      <li>The given field must exist in the document.
     *      <li>The field value in the Document must exactly match one of the
     *          given values.</ol>
     *
     * @param field the name of the field to filter on.
     * @param values the possible values of the field that search results must
     *      match.
     */
    public FieldFilter(String field, String [] values) {
        searchTerms = new Term[values.length];
        for (int i=0; i<values.length; i++) {
            searchTerms[i] = new Term(field, values[i]);
        }
    }

    /**
     * Creates a new field filter. The name of the field and the value to filter
     * on are specified. In order for a Document to pass this filter, it must:
     * <ol>
     *      <li>The given field must exist in the document.
     *      <li>The field value in the Document must exactly match one of the
     *          given values.</ol>
     *
     * @param field the name of the field to filter on.
     * @param value the value of the field that search results must match.
     */
    public FieldFilter(String field, String value) {
        this(field, new String[] { value });
    }

    public BitSet bits(IndexReader reader) throws IOException {
        //Create a new BitSet with a capacity equal to the size of the index.
        BitSet bits = new BitSet(reader.maxDoc());
        //Match all search terms.
        for (int i=0; i < searchTerms.length; i++) {
            //Get an enumeration of all the documents that match the specified
            //field value.
            TermDocs matchingDocs = reader.termDocs(searchTerms[i]);
            try {
                if (matchingDocs != null) {
                    while(matchingDocs.next()) {
                        bits.set(matchingDocs.doc());
                    }
                }
            }
            finally {
                if (matchingDocs != null) {
                    matchingDocs.close();
                }
            }
        }
        return bits;
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道久久综合精品竹菊| 亚洲国产一区二区在线播放| 91小视频在线观看| 日本不卡视频在线观看| 中文字幕一区二区三区色视频| 欧美一级日韩不卡播放免费| 91精品91久久久中77777| 国产91精品露脸国语对白| 免费观看在线色综合| 亚洲最大成人综合| 国产精品不卡一区| 久久久夜色精品亚洲| 日韩欧美资源站| 欧美精品少妇一区二区三区| 91免费精品国自产拍在线不卡| 久久99久久99| 免费观看在线综合| 日本最新不卡在线| 亚洲第一综合色| 一区二区不卡在线视频 午夜欧美不卡在| 久久精品水蜜桃av综合天堂| 日韩精品一区二区三区视频| 91麻豆精品91久久久久久清纯| 在线视频你懂得一区| 91香蕉视频黄| 色综合久久久久综合体| 99久久久免费精品国产一区二区| 福利电影一区二区三区| 国产在线播精品第三| 国内精品免费在线观看| 久久99精品久久久久| 理论片日本一区| 精油按摩中文字幕久久| 美女网站在线免费欧美精品| 男女性色大片免费观看一区二区| 丝袜a∨在线一区二区三区不卡| 亚洲国产视频一区| 日韩综合在线视频| 婷婷丁香激情综合| 男人操女人的视频在线观看欧美| 日本中文字幕不卡| 免费成人av资源网| 国产中文字幕精品| 懂色av中文字幕一区二区三区| 国产99久久久国产精品| 不卡的电影网站| 99精品国产热久久91蜜凸| 色综合久久久久综合99| 欧美探花视频资源| 欧美一卡二卡三卡四卡| 精品日韩一区二区| 国产女人18毛片水真多成人如厕| 国产最新精品免费| 亚洲一区二区偷拍精品| 91超碰这里只有精品国产| 国产精品99精品久久免费| 男人操女人的视频在线观看欧美 | 国产午夜久久久久| 日韩一级高清毛片| 日韩免费高清av| 日韩欧美国产高清| 欧美一区二区成人6969| 精品国产一区a| 亚洲国产精品久久人人爱| 婷婷久久综合九色综合绿巨人| 美日韩黄色大片| 国产99精品视频| 欧美亚洲国产bt| 日韩西西人体444www| 中文字幕不卡的av| 亚洲成人精品影院| 韩国毛片一区二区三区| 99久久99久久久精品齐齐 | 欧美三级电影一区| 日韩欧美的一区二区| 国产精品精品国产色婷婷| 亚洲成人av在线电影| 国产精品一卡二| 欧美午夜一区二区三区| 久久久五月婷婷| 亚洲妇熟xx妇色黄| 国产精品1区2区3区在线观看| 色婷婷综合久色| 26uuu精品一区二区在线观看| 亚洲视频香蕉人妖| 久久99精品视频| 欧美图区在线视频| 国产精品美女久久久久aⅴ| 天堂久久一区二区三区| www.亚洲人| 精品国产髙清在线看国产毛片| 综合久久给合久久狠狠狠97色| 麻豆国产欧美一区二区三区| 91麻豆6部合集magnet| 久久精品亚洲乱码伦伦中文 | 一区二区三区成人| 国产乱码精品一区二区三| 欧美日韩中文精品| 国产精品久久久久久妇女6080| 蜜桃精品在线观看| 精品视频一区三区九区| 国产精品国产三级国产有无不卡 | 久久精品国产免费看久久精品| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 一区视频在线播放| 韩国av一区二区三区四区| 欧美日韩中文一区| 中文字幕一区在线观看视频| 国产原创一区二区三区| 3d成人动漫网站| 亚洲国产毛片aaaaa无费看 | 成人精品视频网站| 久久综合色婷婷| 秋霞成人午夜伦在线观看| 欧美午夜不卡视频| 亚洲精品免费视频| 99久久综合狠狠综合久久| 国产亚洲制服色| 韩国三级在线一区| 欧美成人艳星乳罩| 美美哒免费高清在线观看视频一区二区| 在线视频国内一区二区| 亚洲日韩欧美一区二区在线| 丁香婷婷综合网| 国产欧美一区二区在线观看| 久久99精品久久只有精品| 精品久久一区二区| 久久黄色级2电影| 91精品国产91久久久久久一区二区 | 亚洲国产一区二区视频| 欧美中文字幕亚洲一区二区va在线| 亚洲三级在线免费| 91啪亚洲精品| 亚洲精品国产无天堂网2021| 91免费国产视频网站| 一区二区三区精密机械公司| 日本韩国视频一区二区| 亚洲影视在线观看| 欧美日韩1234| 日本不卡的三区四区五区| 精品少妇一区二区三区在线播放| 麻豆精品一区二区三区| 日韩精品一区二区三区中文不卡 | 欧美极品xxx| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 欧美激情综合网| 成人免费高清视频| 亚洲精品一卡二卡| 欧美日韩久久不卡| 美女视频一区二区| 国产日韩欧美在线一区| www.在线成人| 亚洲高清不卡在线观看| 日韩欧美激情在线| 丰满亚洲少妇av| 一区二区视频在线看| 91精品国产综合久久婷婷香蕉| 精品一区二区国语对白| 国产精品污污网站在线观看| 色综合天天综合在线视频| 性做久久久久久免费观看| 日韩欧美中文字幕公布| 国产成人精品综合在线观看| 亚洲人快播电影网| 欧美一区二区在线免费播放| 国产美女av一区二区三区| 亚洲乱码国产乱码精品精可以看| 欧美日韩国产在线播放网站| 狠狠色狠狠色综合日日91app| 欧美国产日韩在线观看| 欧美日韩mp4| 国产成人在线观看免费网站| 一区二区三区日本| 久久久91精品国产一区二区精品| 91小视频在线| 国内精品久久久久影院薰衣草| 国产精品久久久久aaaa樱花| 欧美人伦禁忌dvd放荡欲情| 国内精品第一页| 亚洲韩国一区二区三区| 精品日韩欧美一区二区| 色婷婷综合久久久久中文| 蜜桃一区二区三区在线观看| 国产精品国产三级国产aⅴ原创| 91精品国产综合久久久久久久| 大胆亚洲人体视频| 午夜伊人狠狠久久| 亚洲欧洲日产国码二区| 欧美一区二区三区视频免费播放 | 日韩欧美区一区二| 99久久综合色| 国内精品国产成人| 亚洲成人在线观看视频| 国产精品污网站| 日韩欧美www| 欧美男女性生活在线直播观看| 成人综合激情网| 国产一区二区三区免费在线观看| 亚洲综合丁香婷婷六月香| 国产欧美综合色|