This exception should be thrown if something wrong happens when dealing with {@link QueryNode}s.
It also supports NLS messages.
171172173174175176177178179180181
protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException { if (node instanceof WildcardQueryNode || node instanceof FuzzyQueryNode) { throw new QueryNodeException(new MessageImpl( QueryParserMessages.EMPTY_MESSAGE)); } return node;
184185186187188189190191192193194
172173174175176177178179180181182
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())); }
159160161162163164165166167168169
202203204205206207208209210211212
191192193194195196197198199200201
170171172173174175176177178179180
7374757677787980818283
return node; switch (wildcardNode.getText().charAt(0)) { case '*': case '?': throw new QueryNodeException(new MessageImpl( QueryParserMessages.LEADING_WILDCARD_NOT_ALLOWED, node .toQueryString(new EscapeQuerySyntaxImpl()))); } }
6162636465666768697071
} else if (number instanceof Double) { return NumericField.DataType.DOUBLE; } else if (number instanceof Float) { return NumericField.DataType.FLOAT; } else { throw new QueryNodeException( new MessageImpl( QueryParserMessages.NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY, number.getClass())); }
919293949596979899100
return NumericRangeQuery.newDoubleRange(field, precisionStep, (Double) lowerNumber, (Double) upperNumber, minInclusive, maxInclusive); default : throw new QueryNodeException(new MessageImpl( QueryParserMessages.UNSUPPORTED_NUMERIC_DATA_TYPE, numberType)); } }