You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Dave Brosius <db...@apache.org> on 2011/12/21 05:03:18 UTC

LuceneQueryBuilder.visit on RelationQueryNode seems to handle null relPaths oddly

  Seems like absolute paths with similar and spellcheck operations are 
flawed if I'm reading the code correctly.



    public Object visit(RelationQueryNode node, Object data) throws 
RepositoryException {
         PathQueryNode relPath = node.getRelativePath();
         if (*relPath* == null
&& node.getOperation() != QueryConstants.OPERATION_SIMILAR
&& node.getOperation() != QueryConstants.OPERATION_SPELLCHECK) {
             exceptions.add(new InvalidQueryException("@* not supported 
in predicate"));
             return data;
         }
         LocationStepQueryNode[] steps = *relPath*.getPathSteps();