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

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

?? queryparser.java

?? lucene-2.4.0 是一個全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* Generated By:JavaCC: Do not edit this line. QueryParser.java */package org.apache.lucene.queryParser;import java.io.IOException;import java.io.StringReader;import java.text.DateFormat;import java.text.Collator;import java.util.ArrayList;import java.util.Calendar;import java.util.Date;import java.util.HashMap;import java.util.List;import java.util.Locale;import java.util.Map;import java.util.Vector;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.TokenStream;import org.apache.lucene.document.DateField;import org.apache.lucene.document.DateTools;import org.apache.lucene.index.Term;import org.apache.lucene.search.BooleanClause;import org.apache.lucene.search.BooleanQuery;import org.apache.lucene.search.ConstantScoreRangeQuery;import org.apache.lucene.search.FuzzyQuery;import org.apache.lucene.search.MatchAllDocsQuery;import org.apache.lucene.search.MultiPhraseQuery;import org.apache.lucene.search.PhraseQuery;import org.apache.lucene.search.PrefixQuery;import org.apache.lucene.search.Query;import org.apache.lucene.search.RangeQuery;import org.apache.lucene.search.TermQuery;import org.apache.lucene.search.WildcardQuery;import org.apache.lucene.util.Parameter;/** * This class is generated by JavaCC.  The most important method is * {@link #parse(String)}. * * The syntax for query strings is as follows: * A Query is a series of clauses. * A clause may be prefixed by: * <ul> * <li> a plus (<code>+</code>) or a minus (<code>-</code>) sign, indicating * that the clause is required or prohibited respectively; or * <li> a term followed by a colon, indicating the field to be searched. * This enables one to construct queries which search multiple fields. * </ul> * * A clause may be either: * <ul> * <li> a term, indicating all the documents that contain this term; or * <li> a nested query, enclosed in parentheses.  Note that this may be used * with a <code>+</code>/<code>-</code> prefix to require any of a set of * terms. * </ul> * * Thus, in BNF, the query grammar is: * <pre> *   Query  ::= ( Clause )* *   Clause ::= ["+", "-"] [&lt;TERM&gt; ":"] ( &lt;TERM&gt; | "(" Query ")" ) * </pre> * * <p> * Examples of appropriately formatted queries can be found in the <a * href="http://lucene.apache.org/java/docs/queryparsersyntax.html">query syntax * documentation</a>. * </p> * * <p> * In {@link RangeQuery}s, QueryParser tries to detect date values, e.g. * <tt>date:[6/1/2005 TO 6/4/2005]</tt> produces a range query that searches * for "date" fields between 2005-06-01 and 2005-06-04. Note that the format * of the accepted input depends on {@link #setLocale(Locale) the locale}. * By default a date is converted into a search term using the deprecated * {@link DateField} for compatibility reasons. * To use the new {@link DateTools} to convert dates, a * {@link org.apache.lucene.document.DateTools.Resolution} has to be set. * </p> * <p> * The date resolution that shall be used for RangeQueries can be set * using {@link #setDateResolution(DateTools.Resolution)} * or {@link #setDateResolution(String, DateTools.Resolution)}. The former * sets the default date resolution for all fields, whereas the latter can * be used to set field specific date resolutions. Field specific date * resolutions take, if set, precedence over the default date resolution. * </p> * <p> * If you use neither {@link DateField} nor {@link DateTools} in your * index, you can create your own * query parser that inherits QueryParser and overwrites * {@link #getRangeQuery(String, String, String, boolean)} to * use a different method for date conversion. * </p> * * <p>Note that QueryParser is <em>not</em> thread-safe.</p> * */public class QueryParser implements QueryParserConstants {  private static final int CONJ_NONE   = 0;  private static final int CONJ_AND    = 1;  private static final int CONJ_OR     = 2;  private static final int MOD_NONE    = 0;  private static final int MOD_NOT     = 10;  private static final int MOD_REQ     = 11;  // make it possible to call setDefaultOperator() without accessing   // the nested class:  /** Alternative form of QueryParser.Operator.AND */  public static final Operator AND_OPERATOR = Operator.AND;  /** Alternative form of QueryParser.Operator.OR */  public static final Operator OR_OPERATOR = Operator.OR;  /** The actual operator that parser uses to combine query terms */  private Operator operator = OR_OPERATOR;  boolean lowercaseExpandedTerms = true;  boolean useOldRangeQuery= false;  boolean allowLeadingWildcard = false;  boolean enablePositionIncrements = false;  Analyzer analyzer;  String field;  int phraseSlop = 0;  float fuzzyMinSim = FuzzyQuery.defaultMinSimilarity;  int fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;  Locale locale = Locale.getDefault();  // the default date resolution  DateTools.Resolution dateResolution = null;  // maps field names to date resolutions  Map fieldToDateResolution = null;  // The collator to use when determining range inclusion,  // for use when constructing RangeQuerys and ConstantScoreRangeQuerys.  Collator rangeCollator = null;  /** The default operator for parsing queries.    * Use {@link QueryParser#setDefaultOperator} to change it.   */  static public final class Operator extends Parameter {    private Operator(String name) {      super(name);    }    static public final Operator OR = new Operator("OR");    static public final Operator AND = new Operator("AND");  }  /** Constructs a query parser.   *  @param f  the default field for query terms.   *  @param a   used to find terms in the query text.   */  public QueryParser(String f, Analyzer a) {    this(new FastCharStream(new StringReader("")));    analyzer = a;    field = f;  }  /** Parses a query string, returning a {@link org.apache.lucene.search.Query}.   *  @param query  the query string to be parsed.   *  @throws ParseException if the parsing fails   */  public Query parse(String query) throws ParseException {    ReInit(new FastCharStream(new StringReader(query)));    try {      // TopLevelQuery is a Query followed by the end-of-input (EOF)      Query res = TopLevelQuery(field);      return res!=null ? res : newBooleanQuery(false);    }    catch (ParseException tme) {      // rethrow to include the original query:      throw new ParseException("Cannot parse '" +query+ "': " + tme.getMessage());    }    catch (TokenMgrError tme) {      throw new ParseException("Cannot parse '" +query+ "': " + tme.getMessage());    }    catch (BooleanQuery.TooManyClauses tmc) {      throw new ParseException("Cannot parse '" +query+ "': too many boolean clauses");    }  }   /**   * @return Returns the analyzer.   */  public Analyzer getAnalyzer() {    return analyzer;  }  /**   * @return Returns the field.   */  public String getField() {    return field;  }   /**   * Get the minimal similarity for fuzzy queries.   */  public float getFuzzyMinSim() {      return fuzzyMinSim;  }  /**   * Set the minimum similarity for fuzzy queries.   * Default is 0.5f.   */  public void setFuzzyMinSim(float fuzzyMinSim) {      this.fuzzyMinSim = fuzzyMinSim;  }   /**   * Get the prefix length for fuzzy queries.    * @return Returns the fuzzyPrefixLength.   */  public int getFuzzyPrefixLength() {    return fuzzyPrefixLength;  }  /**   * Set the prefix length for fuzzy queries. Default is 0.   * @param fuzzyPrefixLength The fuzzyPrefixLength to set.   */  public void setFuzzyPrefixLength(int fuzzyPrefixLength) {    this.fuzzyPrefixLength = fuzzyPrefixLength;  }  /**   * Sets the default slop for phrases.  If zero, then exact phrase matches   * are required.  Default value is zero.   */  public void setPhraseSlop(int phraseSlop) {    this.phraseSlop = phraseSlop;  }  /**   * Gets the default slop for phrases.   */  public int getPhraseSlop() {    return phraseSlop;  }  /**   * Set to <code>true</code> to allow leading wildcard characters.   * <p>   * When set, <code>*</code> or <code>?</code> are allowed as    * the first character of a PrefixQuery and WildcardQuery.   * Note that this can produce very slow   * queries on big indexes.    * <p>   * Default: false.   */  public void setAllowLeadingWildcard(boolean allowLeadingWildcard) {    this.allowLeadingWildcard = allowLeadingWildcard;  }  /**   * @see #setAllowLeadingWildcard(boolean)   */  public boolean getAllowLeadingWildcard() {    return allowLeadingWildcard;  }  /**   * Set to <code>true</code> to enable position increments in result query.   * <p>   * When set, result phrase and multi-phrase queries will   * be aware of position increments.   * Useful when e.g. a StopFilter increases the position increment of   * the token that follows an omitted token.   * <p>   * Default: false.   */  public void setEnablePositionIncrements(boolean enable) {    this.enablePositionIncrements = enable;  }  /**   * @see #setEnablePositionIncrements(boolean)   */  public boolean getEnablePositionIncrements() {    return enablePositionIncrements;  }  /**   * Sets the boolean operator of the QueryParser.   * In default mode (<code>OR_OPERATOR</code>) terms without any modifiers   * are considered optional: for example <code>capital of Hungary</code> is equal to   * <code>capital OR of OR Hungary</code>.<br/>   * In <code>AND_OPERATOR</code> mode terms are considered to be in conjunction: the   * above mentioned query is parsed as <code>capital AND of AND Hungary</code>   */  public void setDefaultOperator(Operator op) {    this.operator = op;  }  /**   * Gets implicit operator setting, which will be either AND_OPERATOR   * or OR_OPERATOR.   */  public Operator getDefaultOperator() {    return operator;  }  /**   * Whether terms of wildcard, prefix, fuzzy and range queries are to be automatically   * lower-cased or not.  Default is <code>true</code>.   */  public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms) {    this.lowercaseExpandedTerms = lowercaseExpandedTerms;  }  /**   * @see #setLowercaseExpandedTerms(boolean)   */  public boolean getLowercaseExpandedTerms() {    return lowercaseExpandedTerms;  }  /**   * By default QueryParser uses new ConstantScoreRangeQuery in preference to RangeQuery   * for range queries. This implementation is generally preferable because it    * a) Runs faster b) Does not have the scarcity of range terms unduly influence score    * c) avoids any "TooManyBooleanClauses" exception.   * However, if your application really needs to use the old-fashioned RangeQuery and the above   * points are not required then set this option to <code>true</code>   * Default is <code>false</code>.   */  public void setUseOldRangeQuery(boolean useOldRangeQuery) {    this.useOldRangeQuery = useOldRangeQuery;  }  /**   * @see #setUseOldRangeQuery(boolean)   */  public boolean getUseOldRangeQuery() {    return useOldRangeQuery;  }  /**   * Set locale used by date range parsing.   */  public void setLocale(Locale locale) {    this.locale = locale;  }  /**   * Returns current locale, allowing access by subclasses.   */  public Locale getLocale() {    return locale;  }  /**   * Sets the default date resolution used by RangeQueries for fields for which no   * specific date resolutions has been set. Field specific resolutions can be set   * with {@link #setDateResolution(String, DateTools.Resolution)}.   *     * @param dateResolution the default date resolution to set   */  public void setDateResolution(DateTools.Resolution dateResolution) {    this.dateResolution = dateResolution;  }  /**   * Sets the date resolution used by RangeQueries for a specific field.   *     * @param fieldName field for which the date resolution is to be set    * @param dateResolution date resolution to set   */  public void setDateResolution(String fieldName, DateTools.Resolution dateResolution) {    if (fieldName == null) {      throw new IllegalArgumentException("Field cannot be null.");    }    if (fieldToDateResolution == null) {      // lazily initialize HashMap      fieldToDateResolution = new HashMap();    }    fieldToDateResolution.put(fieldName, dateResolution);  }  /**   * Returns the date resolution that is used by RangeQueries for the given field.    * Returns null, if no default or field specific date resolution has been set   * for the given field.   *   */  public DateTools.Resolution getDateResolution(String fieldName) {    if (fieldName == null) {      throw new IllegalArgumentException("Field cannot be null.");    }    if (fieldToDateResolution == null) {      // no field specific date resolutions set; return default date resolution instead      return this.dateResolution;    }    DateTools.Resolution resolution = (DateTools.Resolution) fieldToDateResolution.get(fieldName);    if (resolution == null) {      // no date resolutions set for the given field; return default date resolution instead      resolution = this.dateResolution;    }    return resolution;  }  /**    * Sets the collator used to determine index term inclusion in ranges   * specified either for ConstantScoreRangeQuerys or RangeQuerys (if   * {@link #setUseOldRangeQuery(boolean)} is called with a <code>true</code>   * value.)   * <p/>   * <strong>WARNING:</strong> Setting the rangeCollator to a non-null   * collator using this method will cause every single index Term in the   * Field referenced by lowerTerm and/or upperTerm to be examined.   * Depending on the number of index Terms in this Field, the operation could   * be very slow.   *   *  @param rc  the collator to use when constructing RangeQuerys   *             and ConstantScoreRangeQuerys   */  public void setRangeCollator(Collator rc) {    rangeCollator = rc;  }  /**   * @return the collator used to determine index term inclusion in ranges   *  specified either for ConstantScoreRangeQuerys or RangeQuerys (if   *  {@link #setUseOldRangeQuery(boolean)} is called with a <code>true</code>   *  value.)   */  public Collator getRangeCollator() {    return rangeCollator;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久麻豆一区二区| 日本不卡一区二区三区| 日本91福利区| 国产三级久久久| 亚洲第一福利一区| 色视频成人在线观看免| 中文文精品字幕一区二区| 国产精品一区二区不卡| 国产日本一区二区| av中文字幕在线不卡| 国产精品久久久久桃色tv| 国产成人综合自拍| 国产亚洲短视频| eeuss鲁片一区二区三区在线看| 久久久久久影视| 成人中文字幕在线| 国产精品天美传媒| 欧美在线免费观看视频| 亚洲v精品v日韩v欧美v专区| 日韩一级欧美一级| 久久精品国产精品亚洲红杏| 久久精品一区二区三区不卡| 国产高清亚洲一区| 国产精品久久看| 777亚洲妇女| 99精品视频中文字幕| 亚洲成a人片在线不卡一二三区| 欧美日本在线看| 国产一区二三区好的| 中文字幕高清不卡| 欧美日韩国产高清一区二区| 国产一区二区三区四区五区美女| 国产午夜精品在线观看| 色拍拍在线精品视频8848| 日韩国产成人精品| 中文字幕乱码久久午夜不卡| 一区二区三区中文字幕精品精品 | 久久伊人中文字幕| 色婷婷av一区二区三区大白胸| 五月激情丁香一区二区三区| 欧美精品一区二区精品网| 欧美图区在线视频| 91在线你懂得| 国产乱妇无码大片在线观看| 午夜av一区二区三区| 国产精品高潮呻吟久久| 精品va天堂亚洲国产| 色哟哟国产精品| 成人一区二区在线观看| 国产成人综合在线观看| 美日韩一区二区| 午夜欧美在线一二页| 国产日韩成人精品| 精品少妇一区二区三区视频免付费 | 国产精品毛片高清在线完整版| 欧美一级视频精品观看| 欧美日韩精品福利| 在线观看免费视频综合| 99视频超级精品| 成人自拍视频在线| 国产激情91久久精品导航| 狠狠色丁香久久婷婷综合丁香| 日韩国产欧美一区二区三区| 亚洲精品日产精品乱码不卡| 亚洲国产乱码最新视频| 日韩高清在线不卡| 日韩不卡免费视频| 麻豆专区一区二区三区四区五区| 麻豆国产精品一区二区三区| 九色综合国产一区二区三区| 国产不卡高清在线观看视频| eeuss鲁片一区二区三区| 成人午夜又粗又硬又大| 在线观看亚洲一区| 欧美片网站yy| 日韩丝袜美女视频| 欧美精品一区二区在线播放| 欧美韩国日本一区| 国产精品白丝在线| 天天av天天翘天天综合网色鬼国产| 丝袜诱惑制服诱惑色一区在线观看 | 日本亚洲最大的色成网站www| 美女网站色91| 91免费看`日韩一区二区| 国产午夜精品福利| 亚洲成人av电影在线| 国产精品亚洲成人| 欧美日本在线一区| 久久精品夜夜夜夜久久| 一区二区三区中文字幕精品精品| 午夜激情综合网| 国产精品资源网| 欧美三级中文字幕| 国产香蕉久久精品综合网| 亚洲一二三四在线观看| 国产黄色精品网站| 日韩小视频在线观看专区| 亚洲综合一区二区精品导航| 久久激五月天综合精品| 在线观看成人免费视频| 国产三区在线成人av| 天天色综合天天| 日本福利一区二区| 国产精品久久久久天堂| 久久99国产精品尤物| 欧美日韩在线电影| 一色桃子久久精品亚洲| 裸体歌舞表演一区二区| 91丨九色丨国产丨porny| 久久品道一品道久久精品| 麻豆精品视频在线观看免费| 日韩欧美中文字幕公布| 麻豆一区二区在线| 欧美年轻男男videosbes| 亚洲欧美偷拍三级| 99久久777色| 国产精品乱码久久久久久| 麻豆成人在线观看| 日韩欧美在线123| 久久国产精品一区二区| 欧美日韩一级片网站| 亚洲精品成人在线| 色婷婷激情综合| 亚洲黄色小说网站| 欧美精品久久久久久久多人混战 | 在线视频一区二区免费| 国产欧美一区二区三区鸳鸯浴| 日本成人在线看| 91精品国产入口| 国产一区二区三区久久久 | 国产精品久久夜| 成人午夜私人影院| 国产精品网站一区| 99在线热播精品免费| 国产精品黄色在线观看| 99国产精品一区| 亚洲国产一区二区在线播放| 色94色欧美sute亚洲线路一ni| 婷婷亚洲久悠悠色悠在线播放| 欧美在线免费视屏| 精品中文字幕一区二区小辣椒| 国产精品二三区| 91精品在线免费| 国产精品一二三四| 最新日韩在线视频| 欧美一区二区三区人| 国产成人亚洲综合色影视 | 国产又黄又大久久| 日本一二三四高清不卡| 欧美日韩不卡一区二区| 成人精品在线视频观看| 日韩电影在线免费看| 天堂在线一区二区| 欧美成人综合网站| 99精品欧美一区二区蜜桃免费 | 亚洲欧美乱综合| 精品国产一区二区三区忘忧草| 一本大道久久a久久精品综合| 午夜精品成人在线视频| 国产欧美日本一区视频| 欧美日韩国产小视频在线观看| 国产一区二区三区av电影| 五月天亚洲精品| 一区二区高清视频在线观看| 久久综合久久综合久久| 777午夜精品免费视频| 91捆绑美女网站| 福利电影一区二区| 国产一区二区三区在线观看免费视频| 亚洲午夜在线视频| 一区二区三国产精华液| 一区二区中文视频| 国产精品拍天天在线| 中文成人av在线| 国产女主播视频一区二区| 精品国产人成亚洲区| 欧美一区二区三区男人的天堂| 欧美一级艳片视频免费观看| 欧美日韩一区二区电影| 欧美三级乱人伦电影| 欧美日韩电影在线播放| 51精品国自产在线| 精品久久久久一区二区国产| 精品久久人人做人人爱| 欧美电影精品一区二区| 337p日本欧洲亚洲大胆精品| 久久久亚洲午夜电影| 综合分类小说区另类春色亚洲小说欧美| 久久久精品日韩欧美| 中文字幕欧美国产| 中文字幕在线观看不卡| 一区二区三区在线免费观看 | 99久久婷婷国产综合精品| 成人综合日日夜夜| 色综合色综合色综合色综合色综合| 91在线观看一区二区| 欧美在线你懂的| 欧美丰满美乳xxx高潮www| 久久免费偷拍视频| 亚洲六月丁香色婷婷综合久久|