Package org.apache.lucene.queryparser.flexible.messages

Examples of org.apache.lucene.queryparser.flexible.messages.MessageImpl


      return NumericType.DOUBLE;
    } else if (number instanceof Float) {
      return NumericType.FLOAT;
    } else {
      throw new QueryNodeException(
          new MessageImpl(
              QueryParserMessages.NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY,
              number.getClass()));
    }
   
  }
View Full Code Here


  private void processNode(QueryNode node, QueryBuilder builder)
      throws QueryNodeException {

    if (builder == null) {

      throw new QueryNodeException(new MessageImpl(
          QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, node
              .toQueryString(new EscapeQuerySyntaxImpl()), node.getClass()
              .getName()));

    }
View Full Code Here

   * a new object of this type with the fields "currentToken",
   * "expectedTokenSequences", and "tokenImage" set.
   */
  public ParseException(Token currentTokenVal,
     int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
     super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, initialise(
     currentTokenVal, expectedTokenSequencesVal, tokenImageVal)));
     this.currentToken = currentTokenVal;
     this.expectedTokenSequences = expectedTokenSequencesVal;
     this.tokenImage = tokenImageVal;
   }
View Full Code Here

   * relevant information.  The JavaCC generated code does not use
   * these constructors.
   */

  public ParseException() {
     super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error"));
   }
View Full Code Here

        }
      }
    }

    if (codePointMultiplier > 0) {
      throw new ParseException(new MessageImpl(
          QueryParserMessages.INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION));
    }

    if (lastCharWasEscapeChar) {
      throw new ParseException(new MessageImpl(
          QueryParserMessages.INVALID_SYNTAX_ESCAPE_CHARACTER));
    }

    return new UnescapedCharSequence(output, wasEscaped, 0, length);
  }
View Full Code Here

    } else if ('a' <= c && c <= 'f') {
      return c - 'a' + 10;
    } else if ('A' <= c && c <= 'F') {
      return c - 'A' + 10;
    } else {
      throw new ParseException(new MessageImpl(
          QueryParserMessages.INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE, c));
    }
  }
View Full Code Here

    super(message, throwable);
  }

  public void setQuery(CharSequence query) {
    this.query = query;
    this.message = new MessageImpl(
        QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, "");
  }
View Full Code Here

      protected QueryNode preProcessNode(QueryNode node)
          throws QueryNodeException {

        if (node instanceof WildcardQueryNode || node instanceof FuzzyQueryNode) {

          throw new QueryNodeException(new MessageImpl(
              QueryParserMessages.EMPTY_MESSAGE));

        }

        return node;
View Full Code Here

TOP

Related Classes of org.apache.lucene.queryparser.flexible.messages.MessageImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.