Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C84B1038F for ; Mon, 4 Nov 2013 09:05:22 +0000 (UTC) Received: (qmail 12449 invoked by uid 500); 4 Nov 2013 09:05:22 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 12373 invoked by uid 500); 4 Nov 2013 09:05:21 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 12326 invoked by uid 99); 4 Nov 2013 09:05:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 09:05:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 09:05:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A010F23888CD; Mon, 4 Nov 2013 09:04:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1538532 - in /jackrabbit/oak/trunk/oak-doc/src/site/markdown: differences.md query.md Date: Mon, 04 Nov 2013 09:04:52 -0000 To: oak-commits@jackrabbit.apache.org From: thomasm@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131104090452.A010F23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: thomasm Date: Mon Nov 4 09:04:52 2013 New Revision: 1538532 URL: http://svn.apache.org/r1538532 Log: OAK-301 Document Oak - more query docs Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/differences.md jackrabbit/oak/trunk/oak-doc/src/site/markdown/query.md Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/differences.md URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/differences.md?rev=1538532&r1=1538531&r2=1538532&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-doc/src/site/markdown/differences.md (original) +++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/differences.md Mon Nov 4 09:04:52 2013 @@ -76,9 +76,12 @@ Query Oak does not index content by default as does Jackrabbit 2. You need to create custom indexes when necessary, much like in traditional RDBMSs. If there is no index for a specific query then the repository will be traversed. That is, the query will still work but probably be very slow. - See the [query overview page](query.html) for how to create a custom index. +There were some smaller bugfixes in the query parser which might lead to incompatibility. +See the [query overview page](query.html) for details. + + Observation ----------- Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/query.md URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/query.md?rev=1538532&r1=1538531&r2=1538532&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-doc/src/site/markdown/query.md (original) +++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/query.md Mon Nov 4 09:04:52 2013 @@ -41,6 +41,20 @@ Every conversion is logged in `debug` le _Each transformed SQL2 query contains the original XPath query as a comment._ +### Compatibility + +The query parser is now generally more strict about invalid syntax. +The following query used to work in Jackrabbit 2.x, but not in Oak, +because multiple way to quote the path are used at the same time: + + SELECT * FROM [nt:base] AS s + WHERE ISDESCENDANTNODE(s, ["/libs/sling/config"]) + +Instead, the query now needs to be: + + SELECT * FROM [nt:base] AS s + WHERE ISDESCENDANTNODE(s, [/libs/sling/config]) + ### Query Processing Internally, the query engine uses a cost based query optimizer that asks all the available