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

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

?? 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;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人亚洲综合a∨婷婷 | 欧美性大战久久| 日本在线观看不卡视频| 国产亚洲成年网址在线观看| 欧美视频精品在线观看| 粉嫩一区二区三区性色av| 亚洲va中文字幕| 国产精品久久久久桃色tv| 在线综合+亚洲+欧美中文字幕| 欧美日韩和欧美的一区二区| 国产成人精品亚洲777人妖| 日韩国产精品大片| 亚洲女人的天堂| 日本一区二区三区在线不卡| 欧美成人午夜电影| 欧美日韩电影一区| 欧美午夜精品理论片a级按摩| 成人午夜精品在线| 国产一区二区在线观看视频| 麻豆精品视频在线| 三级在线观看一区二区| 一级特黄大欧美久久久| 国产精品资源站在线| 国产精品1区二区.| 亚洲激情男女视频| 久久精品人人做人人爽人人| 精品国产1区二区| 911国产精品| 欧美色区777第一页| 欧美性xxxxxx少妇| 在线观看不卡视频| 色哟哟日韩精品| 一本高清dvd不卡在线观看| 成人免费观看视频| 成人高清视频在线| 97精品国产97久久久久久久久久久久| 国产精品影音先锋| 国内精品伊人久久久久av影院| 麻豆国产欧美一区二区三区| 久久成人久久爱| 国产一区二区三区四区在线观看 | 无吗不卡中文字幕| 亚洲国产日韩一级| 性欧美大战久久久久久久久| 石原莉奈在线亚洲三区| 亚洲一区二三区| 亚洲成av人片一区二区| 精品国产免费人成在线观看| 欧美tickling挠脚心丨vk| 精品日韩一区二区三区| 国产三级精品三级在线专区| 亚洲欧洲性图库| 一区2区3区在线看| 日本人妖一区二区| 精品一区免费av| 国产大片一区二区| 91视频国产观看| 777色狠狠一区二区三区| 日韩免费看的电影| 日本一二三不卡| 一区二区三区日本| 日本成人在线网站| 国产+成+人+亚洲欧洲自线| 91片在线免费观看| 欧美日韩电影在线播放| **性色生活片久久毛片| 亚洲一区二区三区美女| 奇米影视一区二区三区小说| 国产美女视频一区| jlzzjlzz欧美大全| 欧美日精品一区视频| 日韩一区二区在线播放| 日本一区二区三区久久久久久久久不 | 99re视频精品| 欧美日韩高清一区| 国产亚洲欧美一区在线观看| 中文字幕制服丝袜成人av| 午夜精品一区二区三区电影天堂| 激情久久久久久久久久久久久久久久| 成人性色生活片| 欧美巨大另类极品videosbest | 精品免费视频.| 国产精品免费久久久久| 三级影片在线观看欧美日韩一区二区| 国产美女一区二区| 欧美另类变人与禽xxxxx| 欧美国产乱子伦 | 国模冰冰炮一区二区| 欧美午夜精品久久久| 久久久国产午夜精品| 亚洲一区在线播放| 国产成人亚洲综合a∨猫咪| 精品视频免费看| 亚洲欧洲成人自拍| 国精产品一区一区三区mba桃花| 色噜噜久久综合| 久久婷婷久久一区二区三区| 亚洲综合激情网| 不卡的av在线| 精品国产91洋老外米糕| 尤物视频一区二区| 成人涩涩免费视频| 精品1区2区在线观看| 成人av资源站| 精品少妇一区二区三区在线视频| 一个色综合av| 丁香亚洲综合激情啪啪综合| 欧美一区二区成人| 亚洲一区二区av电影| 成人国产亚洲欧美成人综合网| 日韩免费观看高清完整版在线观看| 一级日本不卡的影视| 99久久久久久99| 中文字幕精品综合| 国产精品伊人色| 日韩欧美亚洲国产精品字幕久久久| 日韩理论片一区二区| 国产激情一区二区三区四区| 日韩精品一区二区在线观看| 日韩中文字幕1| 欧美午夜精品理论片a级按摩| 亚洲天堂成人网| 91视频xxxx| 亚洲欧美日韩中文字幕一区二区三区| 国产不卡一区视频| 国产亚洲午夜高清国产拍精品| 精品一区二区三区免费播放 | 久久久高清一区二区三区| 天天综合网 天天综合色| 欧美日韩和欧美的一区二区| 一区二区三区蜜桃| 在线看不卡av| 一区二区三区精品在线| 欧美中文字幕一二三区视频| 一区二区三区国产精华| 欧美综合一区二区| 亚洲午夜久久久| 欧美日韩在线综合| 调教+趴+乳夹+国产+精品| 欧美丰满一区二区免费视频| 热久久一区二区| 精品99一区二区| 国产精品羞羞答答xxdd| 国产日韩欧美制服另类| 不卡视频一二三四| 亚洲视频一二区| 欧美亚洲另类激情小说| 同产精品九九九| 日韩欧美视频在线| 国产一区不卡在线| 国产精品麻豆一区二区| 91免费看片在线观看| 午夜电影久久久| 日韩欧美高清dvd碟片| 国产精品一区在线观看乱码| 国产精品女同一区二区三区| 在线欧美日韩国产| 热久久免费视频| 国产欧美精品一区二区三区四区| 99久久综合精品| 亚洲国产视频在线| 精品国产免费久久| av网站免费线看精品| 亚洲一区二区精品视频| 精品嫩草影院久久| 波多野结衣亚洲| 亚洲三级电影网站| 亚洲地区一二三色| 亚洲成人综合网站| 国产成人精品免费一区二区| 中文字幕欧美一| 欧美国产成人精品| 欧美日韩在线三区| 国内欧美视频一区二区| 亚洲视频免费在线观看| 欧美另类z0zxhd电影| 韩国欧美国产1区| 一区二区三区四区乱视频| 精品国产乱子伦一区| 99国产欧美另类久久久精品| 日本麻豆一区二区三区视频| 国产精品无遮挡| 91精品国产手机| 91啪亚洲精品| 久久福利视频一区二区| 亚洲精品日韩专区silk| 久久婷婷色综合| 欧美日韩国产123区| 成人美女在线观看| 日本成人在线看| 亚洲激情在线激情| 久久久久国产精品人| 欧美狂野另类xxxxoooo| caoporm超碰国产精品| 久久国产成人午夜av影院| 亚洲高清免费视频| 中文字幕欧美国产| 欧美大度的电影原声| 欧美日韩国产大片| 色综合久久九月婷婷色综合|