jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1336191 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/api/ main/java/org/apache/jackrabbit/oak/query/ main/java/org/apache/jackrabbit/oak/query/ast/ main/java/org/apache/jackrabbit/oak/query/index/ test/resou...
Date Wed, 09 May 2012 13:26:06 GMT
Author: thomasm
Date: Wed May  9 13:26:05 2012
New Revision: 1336191

URL: http://svn.apache.org/viewvc?rev=1336191&view=rev
Log:
OAK-28 Query implementation

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/QueryEngine.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ResultRowImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeJoinConditionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ComparisonImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/EquiJoinConditionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LiteralImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyExistenceImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
    jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryTest.txt
    jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryXpathTest.txt

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/QueryEngine.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/QueryEngine.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/QueryEngine.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/QueryEngine.java
Wed May  9 13:26:05 2012
@@ -28,6 +28,13 @@ import java.util.Map;
 public interface QueryEngine {
 
     /**
+     * Get the list of supported query languages.
+     *
+     * @return the supported query languages
+     */
+    List<String> getSupportedQueryLanguages();
+
+    /**
      * Parse the query (check if it's valid) and get the list of bind variable names.
      *
      * @param statement
@@ -45,7 +52,11 @@ public interface QueryEngine {
      * @param bindings the bind variable value bindings
      * @return the result
      * @throws ParseException if the statement could not be parsed
+     * @throws IllegalArgumentException if there was an error executing the query
      */
     Result executeQuery(String statement, String language, Map<String, CoreValue> bindings)
throws ParseException;
 
+    // TODO pass namespace mapping
+    // TODO pass node type information (select * from [xyz] is supposed to return at least
the mandatory columns for xyz)
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
Wed May  9 13:26:05 2012
@@ -448,7 +448,7 @@ public class Query {
     public CoreValue getBindVariableValue(String bindVariableName) {
         CoreValue v = bindVariableMap.get(bindVariableName);
         if (v == null) {
-            throw new RuntimeException("Bind variable value not set: " + bindVariableName);
+            throw new IllegalArgumentException("Bind variable value not set: " + bindVariableName);
         }
         return v;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
Wed May  9 13:26:05 2012
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.oak.query;
 
 import java.text.ParseException;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -47,6 +48,11 @@ public class QueryEngineImpl implements 
         parserSQL2 = new SQL2Parser(vf);
     }
 
+    @Override
+    public List<String> getSupportedQueryLanguages() {
+        return Arrays.asList(SQL2, XPATH);
+    }
+
     /**
      * Parse the query (check if it's valid) and get the list of bind variable names.
      *

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ResultRowImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ResultRowImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ResultRowImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ResultRowImpl.java
Wed May  9 13:26:05 2012
@@ -63,7 +63,7 @@ public class ResultRowImpl implements Re
     @Override
     public CoreValue[] getValues() {
         CoreValue[] v2 = new CoreValue[values.length];
-        System.arraycopy(values, 0, v2, 0, v2.length);
+        System.arraycopy(values, 0, v2, 0, values.length);
         return v2;
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java
Wed May  9 13:26:05 2012
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.oak.query;
 
 import org.apache.jackrabbit.oak.api.CoreValue;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
+import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.query.ast.AstElementFactory;
 import org.apache.jackrabbit.oak.query.ast.Operator;
 import org.apache.jackrabbit.oak.query.ast.BindVariableValueImpl;
@@ -200,7 +201,7 @@ public class SQL2Parser {
                 read(",");
                 String selector2 = readName();
                 if (readIf(",")) {
-                    c = factory.sameNodeJoinCondition(selector1, selector2, readPath());
+                    c = factory.sameNodeJoinCondition(selector1, selector2, readAbsolutePath());
                 } else {
                     // TODO verify "." is correct
                     c = factory.sameNodeJoinCondition(selector1, selector2, ".");
@@ -355,21 +356,21 @@ public class SQL2Parser {
         } else if ("ISSAMENODE".equalsIgnoreCase(functionName)) {
             String name = readName();
             if (readIf(",")) {
-                c = factory.sameNode(name, readPath());
+                c = factory.sameNode(name, readAbsolutePath());
             } else {
                 c = factory.sameNode(getOnlySelectorName(), name);
             }
         } else if ("ISCHILDNODE".equalsIgnoreCase(functionName)) {
             String name = readName();
             if (readIf(",")) {
-                c = factory.childNode(name, readPath());
+                c = factory.childNode(name, readAbsolutePath());
             } else {
                 c = factory.childNode(getOnlySelectorName(), name);
             }
         } else if ("ISDESCENDANTNODE".equalsIgnoreCase(functionName)) {
             String name = readName();
             if (readIf(",")) {
-                c = factory.descendantNode(name, readPath());
+                c = factory.descendantNode(name, readAbsolutePath());
             } else {
                 c = factory.descendantNode(getOnlySelectorName(), name);
             }
@@ -380,6 +381,14 @@ public class SQL2Parser {
         return c;
     }
 
+    private String readAbsolutePath() throws ParseException {
+        String path = readPath();
+        if (!PathUtils.isAbsolute(path)) {
+            throw getSyntaxError("absolute path");
+        }
+        return path;
+    }
+
     private String readPath() throws ParseException {
         return readName();
     }
@@ -591,6 +600,16 @@ public class SQL2Parser {
 
     private ColumnImpl[] resolveColumns(ArrayList<ColumnOrWildcard> list) throws ParseException
{
         ArrayList<ColumnImpl> columns = new ArrayList<ColumnImpl>();
+//        for (SelectorImpl selector : selectors) {
+//            String selectorName = selector.getSelectorName();
+//            String columnName;
+//            if (selectors.size() > 1) {
+//                columnName = selectorName + "." + "jcr:path";
+//            } else {
+//                columnName = "jcr:path";
+//            }
+//            columns.add(factory.column(selectorName, "jcr:path", columnName));
+//        }
         for (ColumnOrWildcard c : list) {
             if (c.propertyName == null) {
                 for (SelectorImpl selector : selectors) {
@@ -965,7 +984,7 @@ public class SQL2Parser {
     }
 
     private ParseException getSyntaxError(String expected) {
-        int index = Math.min(parseIndex, statement.length() - 1);
+        int index = Math.max(0, Math.min(parseIndex, statement.length() - 1));
         String query = statement.substring(0, index) + "(*)" + statement.substring(index).trim();
         if (expected != null) {
             query += "; expected: " + expected;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
Wed May  9 13:26:05 2012
@@ -76,9 +76,13 @@ public class XPathToSQL2Converter {
                     descendants = true;
                 } else if (readIf("jcr:root")) {
                     path = "/";
-                    read("/");
                     if (readIf("/")) {
-                        descendants = true;
+                        if (readIf("/")) {
+                            descendants = true;
+                        }
+                    } else {
+                        // expected end of statement
+                        break;
                     }
                 } else {
                     descendants = false;
@@ -86,24 +90,34 @@ public class XPathToSQL2Converter {
                 if (readIf("*")) {
                     nodeType = "nt:base";
                     from = nodeType;
+                } else if (readIf("text")) {
+                    // TODO support text() and jcr:xmltext?
+                    read("(");
+                    read(")");
+                    path = PathUtils.concat(path, "jcr:xmltext");
                 } else if (readIf("element")) {
                     read("(");
-                    if (readIf("*")) {
+                    if (readIf(")")) {
                         // any
                         children = true;
                     } else {
-                        children = false;
-                        String name = readIdentifier();
-                        path = PathUtils.concat(path, name);
+                        if (readIf("*")) {
+                            // any
+                            children = true;
+                        } else {
+                            children = false;
+                            String name = readIdentifier();
+                            path = PathUtils.concat(path, name);
+                        }
+                        if (readIf(",")) {
+                            nodeType = readIdentifier();
+                            from = nodeType;
+                        } else {
+                            nodeType = "nt:base";
+                            from = nodeType;
+                        }
+                        read(")");
                     }
-                    if (readIf(",")) {
-                        nodeType = readIdentifier();
-                        from = nodeType;
-                    } else {
-                        nodeType = "nt:base";
-                        from = nodeType;
-                    }
-                    read(")");
                 } else if (readIf("@")) {
                     Property p = new Property(readIdentifier());
                     columnList.add(p);
@@ -163,6 +177,7 @@ public class XPathToSQL2Converter {
             throw getSyntaxError("<end>");
         }
         StringBuilder buff = new StringBuilder("select ");
+        buff.append("[jcr:path], ");
         if (columnList.isEmpty()) {
             buff.append('*');
         } else {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeImpl.java
Wed May  9 13:26:05 2012
@@ -54,7 +54,7 @@ public class ChildNodeImpl extends Const
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeJoinConditionImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeJoinConditionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ChildNodeJoinConditionImpl.java
Wed May  9 13:26:05 2012
@@ -57,11 +57,11 @@ public class ChildNodeJoinConditionImpl 
     public void bindSelector(SourceImpl source) {
         parentSelector = source.getSelector(parentSelectorName);
         if (parentSelector == null) {
-            throw new RuntimeException("Unknown selector: " + parentSelector);
+            throw new IllegalArgumentException("Unknown selector: " + parentSelector);
         }
         childSelector = source.getSelector(childSelectorName);
         if (childSelector == null) {
-            throw new RuntimeException("Unknown selector: " + childSelectorName);
+            throw new IllegalArgumentException("Unknown selector: " + childSelectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ColumnImpl.java
Wed May  9 13:26:05 2012
@@ -52,7 +52,7 @@ public class ColumnImpl extends AstEleme
     public String toString() {
         if (propertyName != null) {
             return getSelectorName() + '.' + getPropertyName()
-                    + " AS " + getColumnName();
+                    + " AS [" + columnName + "]";
         } else {
             return getSelectorName() + ".*";
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ComparisonImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ComparisonImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ComparisonImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ComparisonImpl.java
Wed May  9 13:26:05 2012
@@ -61,14 +61,13 @@ public class ComparisonImpl extends Cons
         case GREATER_THAN:
         case LESS_OR_EQUAL:
         case LESS_THAN:
-            return operand1.currentValue() .equals(operand2.currentValue());
+            return operand1.currentValue().equals(operand2.currentValue());
         case NOT_EQUAL:
             return !operand1.currentValue().equals(operand2.currentValue());
         case LIKE:
             return evaluateLike(v1, v2);
         }
-        // TODO Auto-generated method stub
-        return false;
+        throw new IllegalArgumentException("Unknown operator: " + operator);
     }
 
     private static boolean evaluateLike(CoreValue v1, CoreValue v2) {
@@ -142,7 +141,7 @@ public class ComparisonImpl extends Cons
                     }
                     return false;
                 default:
-                    throw new RuntimeException("Internal error: " + type);
+                    throw new IllegalArgumentException("Internal error: " + type);
                 }
             }
             return si == sLen;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeImpl.java
Wed May  9 13:26:05 2012
@@ -60,7 +60,7 @@ public class DescendantNodeImpl extends 
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/DescendantNodeJoinConditionImpl.java
Wed May  9 13:26:05 2012
@@ -58,11 +58,11 @@ public class DescendantNodeJoinCondition
     public void bindSelector(SourceImpl source) {
         descendantSelector = source.getSelector(descendantSelectorName);
         if (descendantSelector == null) {
-            throw new RuntimeException("Unknown selector: " + descendantSelectorName);
+            throw new IllegalArgumentException("Unknown selector: " + descendantSelectorName);
         }
         ancestorSelector = source.getSelector(ancestorSelectorName);
         if (ancestorSelector == null) {
-            throw new RuntimeException("Unknown selector: " + ancestorSelectorName);
+            throw new IllegalArgumentException("Unknown selector: " + ancestorSelectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/EquiJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/EquiJoinConditionImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/EquiJoinConditionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/EquiJoinConditionImpl.java
Wed May  9 13:26:05 2012
@@ -69,11 +69,11 @@ public class EquiJoinConditionImpl exten
     public void bindSelector(SourceImpl source) {
         selector1 = source.getSelector(selector1Name);
         if (selector1 == null) {
-            throw new RuntimeException("Unknown selector: " + selector1Name);
+            throw new IllegalArgumentException("Unknown selector: " + selector1Name);
         }
         selector2 = source.getSelector(selector2Name);
         if (selector2 == null) {
-            throw new RuntimeException("Unknown selector: " + selector2Name);
+            throw new IllegalArgumentException("Unknown selector: " + selector2Name);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LiteralImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LiteralImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LiteralImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/LiteralImpl.java
Wed May  9 13:26:05 2012
@@ -42,10 +42,7 @@ public class LiteralImpl extends StaticO
 
     @Override
     public String toString() {
-        return PropertyType.nameFromValue(value.getType()).toUpperCase();
-    }
-
-    private String cast(String type) {
+        String type = PropertyType.nameFromValue(value.getType()).toUpperCase();
         return "CAST(" + escape() + " AS " + type + ')';
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
Wed May  9 13:26:05 2012
@@ -48,7 +48,7 @@ public class NodeLocalNameImpl extends D
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
Wed May  9 13:26:05 2012
@@ -48,7 +48,7 @@ public class NodeNameImpl extends Dynami
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyExistenceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyExistenceImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyExistenceImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyExistenceImpl.java
Wed May  9 13:26:05 2012
@@ -60,7 +60,7 @@ public class PropertyExistenceImpl exten
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
Wed May  9 13:26:05 2012
@@ -86,7 +86,7 @@ public class PropertyValueImpl extends D
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeImpl.java
Wed May  9 13:26:05 2012
@@ -58,7 +58,7 @@ public class SameNodeImpl extends Constr
     public void bindSelector(SourceImpl source) {
         selector = source.getSelector(selectorName);
         if (selector == null) {
-            throw new RuntimeException("Unknown selector: " + selectorName);
+            throw new IllegalArgumentException("Unknown selector: " + selectorName);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SameNodeJoinConditionImpl.java
Wed May  9 13:26:05 2012
@@ -71,11 +71,11 @@ public class SameNodeJoinConditionImpl e
     public void bindSelector(SourceImpl source) {
         selector1 = source.getSelector(selector1Name);
         if (selector1 == null) {
-            throw new RuntimeException("Unknown selector: " + selector1Name);
+            throw new IllegalArgumentException("Unknown selector: " + selector1Name);
         }
         selector2 = source.getSelector(selector2Name);
         if (selector2 == null) {
-            throw new RuntimeException("Unknown selector: " + selector2Name);
+            throw new IllegalArgumentException("Unknown selector: " + selector2Name);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
Wed May  9 13:26:05 2012
@@ -120,7 +120,7 @@ public class FilterImpl implements Filte
         propertyRestrictions.clear();
         valuePrefix = "none";
         nodeType = "none";
-        path = "none";
+        path = "/";
         pathRestriction = PathRestriction.EXACT;
         alwaysFalse = true;
     }
@@ -158,7 +158,7 @@ public class FilterImpl implements Filte
         case ALL_CHILDREN:
             return PathUtils.isAncestor(this.path, path);
         default:
-            throw new RuntimeException("Unknown path restriction: " + pathRestriction);
+            throw new IllegalArgumentException("Unknown path restriction: " + pathRestriction);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryTest.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryTest.txt?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryTest.txt
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryTest.txt
Wed May  9 13:26:05 2012
@@ -32,12 +32,17 @@ nt:base AS nt:base /* propertyIndex "id 
 select * from [nt:base] where id = '10'
 /test/a
 
+select [jcr:path], * from [nt:base] where id = '10'
+/test/a, null
+
 explain select * from [nt:base] where id > '10'
 nt:base AS nt:base /* traverse "//*" */
 
 commit / - "test"
 commit /jcr:system/indexes - "property:id"
 
+# other tests
+
 commit / + "test": { "jcr:resource": {}, "resource": { "x" : {}}}
 
 select * from [nt:base] where id = -1

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryXpathTest.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryXpathTest.txt?rev=1336191&r1=1336190&r2=1336191&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryXpathTest.txt
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/queryXpathTest.txt
Wed May  9 13:26:05 2012
@@ -18,148 +18,160 @@
 # * lines starting with "xpath" are xpath queries, followed by expected sql2 query
 # * use ascii character only
 
+xpath /jcr:root
+select [jcr:path], * from [nt:base] where isdescendantnode('/')
+
+xpath /jcr:root/test/text()
+select [jcr:path], * from [nt:base] where ischildnode('/test/jcr:xmltext')
+
+xpath /jcr:root/test/jcr:xmltext
+select [jcr:path], * from [nt:base] where ischildnode('/test/jcr:xmltext')
+
 xpath //*[@name='Hello']
-select * from [nt:base] where [name] = 'Hello'
+select [jcr:path], * from [nt:base] where [name] = 'Hello'
 
 xpath /jcr:root//*[@name='Hello']
-select * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/')
+select [jcr:path], * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/')
 
 xpath content/*
-select * from [nt:base] where ischildnode('/content')
+select [jcr:path], * from [nt:base] where ischildnode('/content')
 
 xpath content//*
-select * from [nt:base] where isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where isdescendantnode('/content')
 
 xpath content//*[@name='Hello']
-select * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/content')
 
 xpath /jcr:root/content//*[@name='Hello']
-select * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where ([name] = 'Hello') and isdescendantnode('/content')
 
 xpath //*[jcr:contains(., 'test')] order by @jcr:score
-select * from [nt:base] where contains(*, 'test') order by [jcr:score]
+select [jcr:path], * from [nt:base] where contains(*, 'test') order by [jcr:score]
 
 xpath /jcr:root//*[jcr:contains(., 'test')] order by @jcr:score
-select * from [nt:base] where contains(*, 'test') and isdescendantnode('/') order by [jcr:score]
+select [jcr:path], * from [nt:base] where contains(*, 'test') and isdescendantnode('/') order
by [jcr:score]
 
 xpath /jcr:root//element(*, test)
-select * from [test] where isdescendantnode('/')
+select [jcr:path], * from [test] where isdescendantnode('/')
 
 xpath /jcr:root//element(*, user)[test/@jcr:primaryType]
-select * from [user] where ([test/jcr:primaryType] is not null) and isdescendantnode('/')
+select [jcr:path], * from [user] where ([test/jcr:primaryType] is not null) and isdescendantnode('/')
 
 xpath /jcr:root/content//*[(@sling:resourceType = 'start')]
-select * from [nt:base] where ([sling:resourceType] = 'start') and isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where ([sling:resourceType] = 'start') and isdescendantnode('/content')
 
 xpath /jcr:root/content//*[(@sling:resourceType = 'page')]
-select * from [nt:base] where ([sling:resourceType] = 'page') and isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where ([sling:resourceType] = 'page') and isdescendantnode('/content')
 
 xpath /jcr:root/content//*[@offTime > xs:dateTime('2012-03-28T15:56:18.327+02:00') or
@onTime > xs:dateTime('2012-03-28T15:56:18.327+02:00')]
-select * from [nt:base] where (([offTime] > cast('2012-03-28T15:56:18.327+02:00' as date))
or ([onTime] > cast('2012-03-28T15:56:18.327+02:00' as date))) and isdescendantnode('/content')
+select [jcr:path], * from [nt:base] where (([offTime] > cast('2012-03-28T15:56:18.327+02:00'
as date)) or ([onTime] > cast('2012-03-28T15:56:18.327+02:00' as date))) and isdescendantnode('/content')
 
 xpath /jcr:root/content/campaigns//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified
descending
-select * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/content/campaigns')
order by [jcr:content/lastModified] desc
+select [jcr:path], * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/content/campaigns')
order by [jcr:content/lastModified] desc
 
 xpath /jcr:root/content/campaigns//element(*, PageContent)[(@sling:resourceType = 'teaser'
or @sling:resourceType = 'newsletter' or @teaserPageType = 'newsletter' or @teaserPageType
= 'tweet') and ((@onTime < xs:dateTime('2012-04-01T00:00:00.000+02:00')) or not(@onTime))
and ((@offTime >= xs:dateTime('2012-02-26T00:00:00.000+01:00')) or not(@offTime))] order
by @onTime
-select * from [PageContent] where (((((([sling:resourceType] = 'teaser') or ([sling:resourceType]
= 'newsletter')) or ([teaserPageType] = 'newsletter')) or ([teaserPageType] = 'tweet')) and
(([onTime] < cast('2012-04-01T00:00:00.000+02:00' as date)) or ([onTime] is null))) and
(([offTime] >= cast('2012-02-26T00:00:00.000+01:00' as date)) or ([offTime] is null)))
and isdescendantnode('/content/campaigns') order by [onTime]
+select [jcr:path], * from [PageContent] where (((((([sling:resourceType] = 'teaser') or ([sling:resourceType]
= 'newsletter')) or ([teaserPageType] = 'newsletter')) or ([teaserPageType] = 'tweet')) and
(([onTime] < cast('2012-04-01T00:00:00.000+02:00' as date)) or ([onTime] is null))) and
(([offTime] >= cast('2012-02-26T00:00:00.000+01:00' as date)) or ([offTime] is null)))
and isdescendantnode('/content/campaigns') order by [onTime]
 
 xpath /jcr:root/content/dam//element(*, asset)[jcr:content/metadata/@dam:scene]
-select * from [asset] where ([jcr:content/metadata/dam:scene] is not null) and isdescendantnode('/content/dam')
+select [jcr:path], * from [asset] where ([jcr:content/metadata/dam:scene] is not null) and
isdescendantnode('/content/dam')
 
 xpath /jcr:root/etc/cloud//*[(@sling:resourceType = 'framework')]
-select * from [nt:base] where ([sling:resourceType] = 'framework') and isdescendantnode('/etc/cloud')
+select [jcr:path], * from [nt:base] where ([sling:resourceType] = 'framework') and isdescendantnode('/etc/cloud')
 
 xpath /jcr:root/etc/cloud//*[(@sling:resourceType = 'analytics')]
-select * from [nt:base] where ([sling:resourceType] = 'analytics') and isdescendantnode('/etc/cloud')
+select [jcr:path], * from [nt:base] where ([sling:resourceType] = 'analytics') and isdescendantnode('/etc/cloud')
 
 xpath /jcr:root/etc/reports//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified
descending
-select * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/etc/reports')
order by [jcr:content/lastModified] desc
+select [jcr:path], * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/etc/reports')
order by [jcr:content/lastModified] desc
 
 xpath /jcr:root/etc/segment//*[@jcr:primaryType='Page'] order by jcr:content/@lastModified
descending
-select * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/etc/segment')
order by [jcr:content/lastModified] desc
+select [jcr:path], * from [nt:base] where ([jcr:primaryType] = 'Page') and isdescendantnode('/etc/segment')
order by [jcr:content/lastModified] desc
 
 xpath /jcr:root/etc/workflow//element(*,Item)[not(meta/@archived) and not(meta/@archived
= true)]
-select * from [Item] where (([meta/archived] is null) and not([meta/archived] = true)) and
isdescendantnode('/etc/workflow')
+select [jcr:path], * from [Item] where (([meta/archived] is null) and not([meta/archived]
= true)) and isdescendantnode('/etc/workflow')
+
+xpath /jcr:root/home//element()
+select [jcr:path], * from [nt:base] where isdescendantnode('/home')
 
 xpath /jcr:root/home//element(*)
-select * from [nt:base] where isdescendantnode('/home')
+select [jcr:path], * from [nt:base] where isdescendantnode('/home')
 
 # other queries
 
 xpath //*
-select * from [nt:base]
+select [jcr:path], * from [nt:base]
 
 xpath //element(*, my:type)
-select * from [my:type]
+select [jcr:path], * from [my:type]
 
 xpath //element(*, my:type)/@my:title
-select [my:title] from [my:type]
+select [jcr:path], [my:title] from [my:type]
 
 xpath //element(*, my:type)/(@my:title | @my:text)
-select [my:title], [my:text] from [my:type]
+select [jcr:path], [my:title], [my:text] from [my:type]
 
 xpath /jcr:root/nodes//element(*, my:type)
-select * from [my:type] where isdescendantnode('/nodes')
+select [jcr:path], * from [my:type] where isdescendantnode('/nodes')
 
 xpath /jcr:root/some/element(nodes, my:type)
-select * from [my:type] where [jcr:path] = '/some/nodes'
+select [jcr:path], * from [my:type] where [jcr:path] = '/some/nodes'
 
 xpath /jcr:root/some/nodes/element(*, my:type)
-select * from [my:type] where ischildnode('/some/nodes')
+select [jcr:path], * from [my:type] where ischildnode('/some/nodes')
 
 xpath /jcr:root/some/nodes//element(*, my:type)
-select * from [my:type] where isdescendantnode('/some/nodes')
+select [jcr:path], * from [my:type] where isdescendantnode('/some/nodes')
 
 xpath //element(*, my:type)[@my:title = 'JSR 170']
-select * from [my:type] where [my:title] = 'JSR 170'
+select [jcr:path], * from [my:type] where [my:title] = 'JSR 170'
 
 xpath //element(*, my:type)[jcr:like(@title,'%Java%')]
-select * from [my:type] where [title] like '%Java%'
+select [jcr:path], * from [my:type] where [title] like '%Java%'
 
 xpath //element(*, my:type)[jcr:contains(., 'JSR 170')]
-select * from [my:type] where contains(*, 'JSR 170')
+select [jcr:path], * from [my:type] where contains(*, 'JSR 170')
 
 xpath //element(*, my:type)[@my:title]
-select * from [my:type] where [my:title] is not null
+select [jcr:path], * from [my:type] where [my:title] is not null
 
 xpath //element(*, my:type)[not(@my:title)]
-select * from [my:type] where [my:title] is null
+select [jcr:path], * from [my:type] where [my:title] is null
 
 xpath //element(*, my:type)[@my:value < -1.0]
-select * from [my:type] where [my:value] < -1.0
+select [jcr:path], * from [my:type] where [my:value] < -1.0
 
 xpath //element(*, my:type)[@my:value > +10123123123]
-select * from [my:type] where [my:value] > 10123123123
+select [jcr:path], * from [my:type] where [my:value] > 10123123123
 
 xpath //element(*, my:type)[@my:value <= 10.3e-3]
-select * from [my:type] where [my:value] <= 10.3e-3
+select [jcr:path], * from [my:type] where [my:value] <= 10.3e-3
 
 xpath //element(*, my:type)[@my:value >= 0e3]
-select * from [my:type] where [my:value] >= 0e3
+select [jcr:path], * from [my:type] where [my:value] >= 0e3
 
 xpath //element(*, my:type)[@my:value <> 'Joe''s Caffee']
-select * from [my:type] where [my:value] <> 'Joe''s Caffee'
+select [jcr:path], * from [my:type] where [my:value] <> 'Joe''s Caffee'
 
 xpath //element(*, my:type)[(not(@my:title) and @my:subject)]
-select * from [my:type] where ([my:title] is null) and ([my:subject] is not null)
+select [jcr:path], * from [my:type] where ([my:title] is null) and ([my:subject] is not null)
 
 xpath //element(*, my:type)[not(@my:title) or @my:subject]
-select * from [my:type] where ([my:title] is null) or ([my:subject] is not null)
+select [jcr:path], * from [my:type] where ([my:title] is null) or ([my:subject] is not null)
 
 xpath //element(*, my:type)[not(@my:value > 0 and @my:value < 100)]
-select * from [my:type] where not(([my:value] > 0) and ([my:value] < 100))
+select [jcr:path], * from [my:type] where not(([my:value] > 0) and ([my:value] < 100))
 
 xpath //element(*, my:type) order by @jcr:lastModified
-select * from [my:type] order by [jcr:lastModified]
+select [jcr:path], * from [my:type] order by [jcr:lastModified]
 
 xpath //element(*, my:type) order by @my:date descending, @my:title ascending
-select * from [my:type] order by [my:date] desc, [my:title]
+select [jcr:path], * from [my:type] order by [my:date] desc, [my:title]
 
 xpath //element(*, my:type)[jcr:contains(., 'jcr')] order by jcr:score() descending
-select * from [my:type] where contains(*, 'jcr') order by score() desc
+select [jcr:path], * from [my:type] where contains(*, 'jcr') order by score() desc
 
 xpath //element(*, my:type)[jcr:contains(@my:title, 'jcr')] order by jcr:score() descending
-select * from [my:type] where contains([my:title], 'jcr') order by score() desc
+select [jcr:path], * from [my:type] where contains([my:title], 'jcr') order by score() desc
 
 xpath [invalid/query
 invalid: Query: /jcr:root/[(*)invalid/query; expected: identifier



Mime
View raw message