Package org.apache.lucene.messages

Examples of org.apache.lucene.messages.MessageImpl


  public ParseException(Message message) {
    super(message);
  }

  public ParseException() {
    super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, new Object[]{"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, new Object[]{c}));
    }
  }
View Full Code Here

      catch (ParseException tme) {
            tme.setQuery(query);
            throw tme;
      }
      catch (Error tme) {
          Message message = new MessageImpl(QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, new Object[]{query, tme.getMessage()});
          QueryNodeParseException e = new QueryNodeParseException(tme);
            e.setQuery(query);
            e.setNonLocalizedMessage(message);
            throw e;
      }
View Full Code Here

          float fms = defaultMinSimilarity;
          try {
            fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
          } catch (Exception ignored) { }
         if(fms < 0.0f || fms > 1.0f){
           {if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS));}
         }
         q = new FuzzyQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), fms, term.beginColumn, term.endColumn);
       }
      break;
    case RANGEIN_START:
View Full Code Here

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

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

      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

      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

      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.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.