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

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


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

  public ParseException() {
     super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error"));
   }
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

          try {
            bQuery.add(query, getModifierValue(child));

          } catch (TooManyClauses ex) {

            throw new QueryNodeException(new MessageImpl(
                QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, BooleanQuery
                    .getMaxClauseCount(), queryNode
                    .toQueryString(new EscapeQuerySyntaxImpl())), ex);

          }
View Full Code Here

        return NumericRangeQuery.newDoubleRange(field, precisionStep,
            (Double) lowerNumber, (Double) upperNumber, minInclusive,
            maxInclusive);
       
        default :
          throw new QueryNodeException(new MessageImpl(
            QueryParserMessages.UNSUPPORTED_NUMERIC_DATA_TYPE, numberType));
       
    }
  }
View Full Code Here

  @Override
  public MatchAllDocsQuery build(QueryNode queryNode) throws QueryNodeException {

    // validates node
    if (!(queryNode instanceof MatchAllDocsQueryNode)) {
      throw new QueryNodeException(new MessageImpl(
          QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, queryNode
              .toQueryString(new EscapeQuerySyntaxImpl()), queryNode.getClass()
              .getName()));
    }
View Full Code Here

  @Override
  public BooleanQuery build(QueryNode queryNode) throws QueryNodeException {

    // validates node
    if (!(queryNode instanceof MatchNoDocsQueryNode)) {
      throw new QueryNodeException(new MessageImpl(
          QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, queryNode
              .toQueryString(new EscapeQuerySyntaxImpl()), queryNode.getClass()
              .getName()));
    }
View Full Code Here

          try {
            bQuery.add(query, getModifierValue(child));
          } catch (TooManyClauses ex) {

            throw new QueryNodeException(new MessageImpl(
                QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, BooleanQuery
                    .getMaxClauseCount(), queryNode
                    .toQueryString(new EscapeQuerySyntaxImpl())), ex);

          }
View Full Code Here

          try {
            bQuery.add(query, BooleanClause.Occur.SHOULD);
          } catch (TooManyClauses ex) {

            throw new QueryNodeException(new MessageImpl(
            /*
             * IQQQ.Q0028E_TOO_MANY_BOOLEAN_CLAUSES,
             * BooleanQuery.getMaxClauseCount()
             */QueryParserMessages.EMPTY_MESSAGE), ex);

View Full Code Here

  @Override
  protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {

    if (!((node instanceof BooleanQueryNode && !(node instanceof AndQueryNode)) || node
        .getClass() == FieldQueryNode.class)) {
      throw new QueryNodeException(new MessageImpl(
          QueryParserMessages.NODE_ACTION_NOT_SUPPORTED));
    }

    return node;
View Full Code Here

          return node;
       
        switch (wildcardNode.getText().charAt(0)) {   
          case '*':
          case '?':
            throw new QueryNodeException(new MessageImpl(
                QueryParserMessages.LEADING_WILDCARD_NOT_ALLOWED, node
                    .toQueryString(new EscapeQuerySyntaxImpl())));   
        }
      }

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.