This exception should be thrown if something wrong happens when dealing with {@link QueryNode}s.
It also supports NLS messages.
175176177178179180181182183184185
protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException { if (node instanceof WildcardQueryNode || node instanceof FuzzyQueryNode) { throw new QueryNodeException(new MessageImpl( QueryParserMessages.EMPTY_MESSAGE)); } return node;
157158159160161162163164165166167
6465666768697071727374
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); }
7374757677787980818283
return node; switch (wildcardNode.getText().charAt(0)) { case '*': case '?': throw new QueryNodeException(new MessageImpl( QueryParserMessages.LEADING_WILDCARD_NOT_ALLOWED, node .toQueryString(new EscapeQuerySyntaxImpl()))); } }
3738394041424344454647
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())); }
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())); }
6566676869707172737475
public MatchAllDocsQuery build(QueryNode queryNode) throws QueryNodeException { // validates node if (!(queryNode instanceof MatchAllDocsQueryNode)) { throw new QueryNodeException(new MessageImpl( QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, new Object[]{queryNode .toQueryString(new EscapeQuerySyntaxImpl()), queryNode.getClass() .getName()})); }
public BooleanQuery build(QueryNode queryNode) throws QueryNodeException { // validates node if (!(queryNode instanceof MatchNoDocsQueryNode)) { throw new QueryNodeException(new MessageImpl( QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, new Object[]{queryNode .toQueryString(new EscapeQuerySyntaxImpl()), queryNode.getClass() .getName()})); }
172173174175176177178179180181182
private void processNode(QueryNode node, QueryBuilder builder) throws QueryNodeException { if (builder == null) { throw new QueryNodeException(new MessageImpl( QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, new Object[]{node .toQueryString(new EscapeQuerySyntaxImpl()), node.getClass() .getName()})); }