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

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

?? queryparser.java

?? lucene-2.4.0 是一個全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
    if (lowercaseExpandedTerms) {      termStr = termStr.toLowerCase();    }    Term t = new Term(field, termStr);    return newWildcardQuery(t);  }  /**   * Factory method for generating a query (similar to   * {@link #getWildcardQuery}). Called when parser parses an input term   * token that uses prefix notation; that is, contains a single '*' wildcard   * character as its last character. Since this is a special case   * of generic wildcard term, and such a query can be optimized easily,   * this usually results in a different query object.   *<p>   * Depending on settings, a prefix term may be lower-cased   * automatically. It will not go through the default Analyzer,   * however, since normal Analyzers are unlikely to work properly   * with wildcard templates.   *<p>   * Can be overridden by extending classes, to provide custom handling for   * wild card queries, which may be necessary due to missing analyzer calls.   *   * @param field Name of the field query will use.   * @param termStr Term token to use for building term for the query   *    (<b>without</b> trailing '*' character!)   *   * @return Resulting {@link Query} built for the term   * @exception ParseException throw in overridden method to disallow   */  protected Query getPrefixQuery(String field, String termStr) throws ParseException  {    if (!allowLeadingWildcard && termStr.startsWith("*"))      throw new ParseException("'*' not allowed as first character in PrefixQuery");    if (lowercaseExpandedTerms) {      termStr = termStr.toLowerCase();    }    Term t = new Term(field, termStr);    return newPrefixQuery(t);  }   /**   * Factory method for generating a query (similar to   * {@link #getWildcardQuery}). Called when parser parses   * an input term token that has the fuzzy suffix (~) appended.   *   * @param field Name of the field query will use.   * @param termStr Term token to use for building term for the query   *   * @return Resulting {@link Query} built for the term   * @exception ParseException throw in overridden method to disallow   */  protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException  {    if (lowercaseExpandedTerms) {      termStr = termStr.toLowerCase();    }    Term t = new Term(field, termStr);    return newFuzzyQuery(t, minSimilarity, fuzzyPrefixLength);  }  /**   * Returns a String where the escape char has been   * removed, or kept only once if there was a double escape.   *    * Supports escaped unicode characters, e. g. translates   * <code>\\u0041</code> to <code>A</code>.   *    */  private String discardEscapeChar(String input) throws ParseException {    // Create char array to hold unescaped char sequence    char[] output = new char[input.length()];    // The length of the output can be less than the input    // due to discarded escape chars. This variable holds    // the actual length of the output    int length = 0;    // We remember whether the last processed character was     // an escape character    boolean lastCharWasEscapeChar = false;    // The multiplier the current unicode digit must be multiplied with.    // E. g. the first digit must be multiplied with 16^3, the second with 16^2...    int codePointMultiplier = 0;    // Used to calculate the codepoint of the escaped unicode character    int codePoint = 0;    for (int i = 0; i < input.length(); i++) {      char curChar = input.charAt(i);      if (codePointMultiplier > 0) {        codePoint += hexToInt(curChar) * codePointMultiplier;        codePointMultiplier >>>= 4;        if (codePointMultiplier == 0) {          output[length++] = (char)codePoint;          codePoint = 0;        }      } else if (lastCharWasEscapeChar) {        if (curChar == 'u') {          // found an escaped unicode character          codePointMultiplier = 16 * 16 * 16;        } else {          // this character was escaped          output[length] = curChar;          length++;        }        lastCharWasEscapeChar = false;      } else {        if (curChar == '\\') {          lastCharWasEscapeChar = true;        } else {          output[length] = curChar;          length++;        }      }    }    if (codePointMultiplier > 0) {      throw new ParseException("Truncated unicode escape sequence.");    }    if (lastCharWasEscapeChar) {      throw new ParseException("Term can not end with escape character.");    }    return new String(output, 0, length);  }  /** Returns the numeric value of the hexadecimal character */  private static final int hexToInt(char c) throws ParseException {    if ('0' <= c && c <= '9') {      return c - '0';    } else if ('a' <= c && c <= 'f'){      return c - 'a' + 10;    } else if ('A' <= c && c <= 'F') {      return c - 'A' + 10;    } else {      throw new ParseException("None-hex character in unicode escape sequence: " + c);    }  }  /**   * Returns a String where those characters that QueryParser   * expects to be escaped are escaped by a preceding <code>\</code>.   */  public static String escape(String s) {    StringBuffer sb = new StringBuffer();    for (int i = 0; i < s.length(); i++) {      char c = s.charAt(i);      // These characters are part of the query syntax and must be escaped      if (c == '\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'        || c == '^' || c == '[' || c == ']' || c == '\"' || c == '{' || c == '}' || c == '~'        || c == '*' || c == '?' || c == '|' || c == '&') {        sb.append('\\');      }      sb.append(c);    }    return sb.toString();  }  /**   * Command line tool to test QueryParser, using {@link org.apache.lucene.analysis.SimpleAnalyzer}.   * Usage:<br>   * <code>java org.apache.lucene.queryParser.QueryParser &lt;input&gt;</code>   */  public static void main(String[] args) throws Exception {    if (args.length == 0) {      System.out.println("Usage: java org.apache.lucene.queryParser.QueryParser <input>");      System.exit(0);    }    QueryParser qp = new QueryParser("field",                           new org.apache.lucene.analysis.SimpleAnalyzer());    Query q = qp.parse(args[0]);    System.out.println(q.toString("field"));  }// *   Query  ::= ( Clause )*// *   Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )  final public int Conjunction() throws ParseException {  int ret = CONJ_NONE;    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {    case AND:    case OR:      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case AND:        jj_consume_token(AND);            ret = CONJ_AND;        break;      case OR:        jj_consume_token(OR);              ret = CONJ_OR;        break;      default:        jj_la1[0] = jj_gen;        jj_consume_token(-1);        throw new ParseException();      }      break;    default:      jj_la1[1] = jj_gen;      ;    }    {if (true) return ret;}    throw new Error("Missing return statement in function");  }  final public int Modifiers() throws ParseException {  int ret = MOD_NONE;    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {    case NOT:    case PLUS:    case MINUS:      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case PLUS:        jj_consume_token(PLUS);              ret = MOD_REQ;        break;      case MINUS:        jj_consume_token(MINUS);                 ret = MOD_NOT;        break;      case NOT:        jj_consume_token(NOT);               ret = MOD_NOT;        break;      default:        jj_la1[2] = jj_gen;        jj_consume_token(-1);        throw new ParseException();      }      break;    default:      jj_la1[3] = jj_gen;      ;    }    {if (true) return ret;}    throw new Error("Missing return statement in function");  }// This makes sure that there is no garbage after the query string  final public Query TopLevelQuery(String field) throws ParseException {        Query q;    q = Query(field);    jj_consume_token(0);                {if (true) return q;}    throw new Error("Missing return statement in function");  }  final public Query Query(String field) throws ParseException {  List clauses = new ArrayList();  Query q, firstQuery=null;  int conj, mods;    mods = Modifiers();    q = Clause(field);    addClause(clauses, CONJ_NONE, mods, q);    if (mods == MOD_NONE)        firstQuery=q;    label_1:    while (true) {      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case AND:      case OR:      case NOT:      case PLUS:      case MINUS:      case LPAREN:      case STAR:      case QUOTED:      case TERM:      case PREFIXTERM:      case WILDTERM:      case RANGEIN_START:      case RANGEEX_START:      case NUMBER:        ;        break;      default:        jj_la1[4] = jj_gen;        break label_1;      }      conj = Conjunction();      mods = Modifiers();      q = Clause(field);      addClause(clauses, conj, mods, q);    }      if (clauses.size() == 1 && firstQuery != null)        {if (true) return firstQuery;}      else {  {if (true) return getBooleanQuery(clauses);}      }    throw new Error("Missing return statement in function");  }  final public Query Clause(String field) throws ParseException {  Query q;  Token fieldToken=null, boost=null;    if (jj_2_1(2)) {      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case TERM:        fieldToken = jj_consume_token(TERM);        jj_consume_token(COLON);                               field=discardEscapeChar(fieldToken.image);        break;      case STAR:        jj_consume_token(STAR);        jj_consume_token(COLON);                      field="*";        break;      default:        jj_la1[5] = jj_gen;        jj_consume_token(-1);        throw new ParseException();      }    } else {      ;    }    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {    case STAR:    case QUOTED:    case TERM:    case PREFIXTERM:    case WILDTERM:    case RANGEIN_START:    case RANGEEX_START:    case NUMBER:      q = Term(field);      break;    case LPAREN:      jj_consume_token(LPAREN);      q = Query(field);      jj_consume_token(RPAREN);      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case CARAT:        jj_consume_token(CARAT);        boost = jj_consume_token(NUMBER);        break;      default:        jj_la1[6] = jj_gen;        ;      }      break;    default:      jj_la1[7] = jj_gen;      jj_consume_token(-1);      throw new ParseException();    }      if (boost != null) {        float f = (float)1.0;  try {    f = Float.valueOf(boost.image).floatValue();          q.setBoost(f);  } catch (Exception ignored) { }      }      {if (true) return q;}    throw new Error("Missing return statement in function");  }  final public Query Term(String field) throws ParseException {  Token term, boost=null, fuzzySlop=null, goop1, goop2;  boolean prefix = false;  boolean wildcard = false;  boolean fuzzy = false;  boolean rangein = false;  Query q;    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {    case STAR:    case TERM:    case PREFIXTERM:    case WILDTERM:    case NUMBER:      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case TERM:        term = jj_consume_token(TERM);        break;      case STAR:        term = jj_consume_token(STAR);                       wildcard=true;        break;      case PREFIXTERM:        term = jj_consume_token(PREFIXTERM);                             prefix=true;        break;      case WILDTERM:        term = jj_consume_token(WILDTERM);                           wildcard=true;        break;      case NUMBER:        term = jj_consume_token(NUMBER);        break;      default:        jj_la1[8] = jj_gen;        jj_consume_token(-1);        throw new ParseException();      }      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case FUZZY_SLOP:        fuzzySlop = jj_consume_token(FUZZY_SLOP);                                fuzzy=true;        break;      default:        jj_la1[9] = jj_gen;        ;      }      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {      case CARAT:        jj_consume_token(CARAT);        boost = jj_consume_token(NUMBER);        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {        case FUZZY_SLOP:          fuzzySlop = jj_consume_token(FUZZY_SLOP);                                                         fuzzy=true;          break;        default:          jj_la1[10] = jj_gen;          ;        }        break;      default:        jj_la1[11] = jj_gen;        ;      }       String termImage=discardEscapeChar(term.image);       if (wildcard) {       q = getWildcardQuery(field, termImage);       } else if (prefix) {         q = getPrefixQuery(field,           discardEscapeChar(term.image.substring          (0, term.image.length()-1)));       } else if (fuzzy) {          float fms = fuzzyMinSim;          try {            fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();          } catch (Exception ignored) { }         if(fms < 0.0f || fms > 1.0f){           {if (true) throw new ParseException("Minimum similarity for a FuzzyQuery has to be between 0.0f and 1.0f !");}         }         q = getFuzzyQuery(field, termImage,fms);       } else {         q = getFieldQuery(field, termImage);       }      break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品网友自拍| 久久欧美中文字幕| 天天av天天翘天天综合网色鬼国产| 欧美中文字幕不卡| 五月天视频一区| 日韩精品一区二区三区四区视频 | 亚洲视频免费在线| 日本韩国欧美国产| 免费在线观看一区| 国产日韩av一区二区| heyzo一本久久综合| 亚洲v精品v日韩v欧美v专区| 91精品国产综合久久福利| 国产在线看一区| 国产精品理论在线观看| 欧美日韩和欧美的一区二区| 激情图片小说一区| 欧美国产精品久久| 欧美精品日韩一本| 国产成人在线电影| 亚洲香肠在线观看| 国产亚洲欧美在线| 欧美性做爰猛烈叫床潮| 国产一区二区91| 亚洲国产综合人成综合网站| wwwwxxxxx欧美| 色琪琪一区二区三区亚洲区| 日本免费新一区视频| 国产精品久久免费看| 欧美一区二区三区男人的天堂| 国产成人免费在线观看| 亚洲成人动漫在线观看| 国产婷婷色一区二区三区四区 | 91福利国产成人精品照片| 奇米四色…亚洲| 亚洲欧美福利一区二区| 精品国产第一区二区三区观看体验| 99久久精品国产一区| 美女视频一区二区| 亚洲电影一区二区| 亚洲欧美综合网| 精品国产一区二区三区忘忧草| 日本久久一区二区| 成人网在线免费视频| 国模套图日韩精品一区二区| 午夜精品久久久| 亚洲欧美成aⅴ人在线观看| 欧美mv日韩mv国产网站app| 欧美日韩一区视频| av不卡在线播放| 国产91高潮流白浆在线麻豆| 毛片av一区二区| 亚洲一区二区影院| 亚洲乱码一区二区三区在线观看| 久久久99免费| 日韩精品一区二区三区老鸭窝| 欧美色图片你懂的| 色综合久久综合网欧美综合网| 国内不卡的二区三区中文字幕| 五月综合激情婷婷六月色窝| 亚洲精品老司机| 亚洲天堂a在线| 国产精品久久久久久久久果冻传媒 | 亚洲美女电影在线| 欧美精品一区二区三区在线 | 一级精品视频在线观看宜春院 | 日韩欧美一区在线观看| 欧美日韩视频在线第一区| 日本韩国精品在线| 91亚洲精品乱码久久久久久蜜桃| 99久久夜色精品国产网站| 国产精品一二一区| 国产精品影视在线观看| 国产毛片精品国产一区二区三区| 卡一卡二国产精品| 韩国午夜理伦三级不卡影院| 精品一区二区三区久久| 国产又粗又猛又爽又黄91精品| 精品一区二区三区在线观看国产| 精品一区二区三区香蕉蜜桃 | 色狠狠av一区二区三区| 一道本成人在线| 91精品福利视频| 欧美综合亚洲图片综合区| 91电影在线观看| 欧美乱妇15p| 日韩欧美电影在线| 久久亚洲欧美国产精品乐播 | 91免费视频观看| 91国模大尺度私拍在线视频| 欧美午夜精品久久久| 欧美精品久久久久久久多人混战| 欧美一区二区啪啪| 精品国产麻豆免费人成网站| 国产欧美综合在线| 亚洲三级电影网站| 午夜欧美大尺度福利影院在线看| 奇米精品一区二区三区在线观看 | 国产aⅴ综合色| 色偷偷久久一区二区三区| 欧美日韩国产123区| 欧美一级精品在线| 中国av一区二区三区| 亚洲一区二区三区四区的| 麻豆一区二区三| 成人国产精品免费观看动漫| 在线免费观看日本一区| 日韩视频中午一区| 中文字幕av不卡| 亚欧色一区w666天堂| 国产乱子伦一区二区三区国色天香| 成人av午夜电影| 欧美高清你懂得| 国产精品视频在线看| 日韩激情av在线| av色综合久久天堂av综合| 3atv一区二区三区| 中文字幕日韩av资源站| 麻豆freexxxx性91精品| 91丨porny丨户外露出| 69堂成人精品免费视频| 亚洲国产精品ⅴa在线观看| 亚洲国产精品一区二区久久| 粉嫩av一区二区三区粉嫩| 欧美高清www午色夜在线视频| 国产精品萝li| 黄页视频在线91| 欧美丰满美乳xxx高潮www| 国产精品女同互慰在线看| 蜜桃精品视频在线| 91黄色激情网站| 中文字幕av一区二区三区免费看| 日韩激情av在线| 91国内精品野花午夜精品| 欧美激情在线看| 九一九一国产精品| 在线免费观看成人短视频| 欧美激情在线一区二区| 麻豆国产精品视频| 欧美日韩精品免费| 一区二区不卡在线播放| 91丨国产丨九色丨pron| 欧美激情综合五月色丁香小说| 久久综合综合久久综合| 欧美日韩免费在线视频| 一区二区三区欧美视频| 懂色中文一区二区在线播放| 欧美变态口味重另类| 天天爽夜夜爽夜夜爽精品视频| 色视频一区二区| 亚洲日本韩国一区| av中文字幕一区| 国产精品入口麻豆九色| 高清在线观看日韩| 国产午夜亚洲精品理论片色戒| 免费精品99久久国产综合精品| 欧美日韩黄色一区二区| 亚洲成a人片综合在线| 91国偷自产一区二区三区成为亚洲经典 | 日韩午夜在线观看| 日韩国产在线一| 欧美一区二区三级| 乱中年女人伦av一区二区| 51久久夜色精品国产麻豆| 香蕉久久一区二区不卡无毒影院 | 另类调教123区| 欧美一区二区福利视频| 免费观看在线综合色| 日韩免费观看高清完整版在线观看| 日韩福利视频导航| 日韩久久久精品| 国产精品综合二区| 国产亚洲一二三区| av激情综合网| 亚洲一区在线视频观看| 欧美日韩国产一级片| 日韩电影一区二区三区四区| 欧美一级欧美一级在线播放| 麻豆极品一区二区三区| 国产三级一区二区| 99精品视频在线播放观看| 亚洲男人天堂一区| 欧美视频自拍偷拍| 青青草精品视频| 国产人成一区二区三区影院| av午夜精品一区二区三区| 亚洲综合丁香婷婷六月香| 在线成人高清不卡| 国产一区91精品张津瑜| 1024亚洲合集| 欧美精品一级二级| 国产精品一卡二| 亚洲精品视频观看| 日韩一卡二卡三卡国产欧美| 国产高清不卡一区| 亚洲午夜视频在线| 2022国产精品视频| 色网综合在线观看| 国产一区二区三区免费观看| 亚洲欧美色图小说|