You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by th...@apache.org on 2020/09/04 16:02:31 UTC

svn commit: r1881461 - in /jackrabbit/site/live/oak/docs: query/grammar-sql2.html query/grammar-xpath.html security/authorization/restriction.html

Author: thomasm
Date: Fri Sep  4 16:02:31 2020
New Revision: 1881461

URL: http://svn.apache.org/viewvc?rev=1881461&view=rev
Log:
OAK-936: Site checkin for project Oak Documentation-1.33-SNAPSHOT

Modified:
    jackrabbit/site/live/oak/docs/query/grammar-sql2.html
    jackrabbit/site/live/oak/docs/query/grammar-xpath.html
    jackrabbit/site/live/oak/docs/security/authorization/restriction.html

Modified: jackrabbit/site/live/oak/docs/query/grammar-sql2.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/grammar-sql2.html?rev=1881461&r1=1881460&r2=1881461&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/grammar-sql2.html (original)
+++ jackrabbit/site/live/oak/docs/query/grammar-sql2.html Fri Sep  4 16:02:31 2020
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-04-22 
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-09-04 
  | Rendered using Apache Maven Fluido Skin 1.6
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20200422" />
+    <meta name="Date-Revision-yyyymmdd" content="20200904" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak &#x2013; Oak SQL-2 Query Grammar</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
@@ -155,9 +155,9 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2020-04-22<span class="divider">|</span>
+        <li id="publishDate">Last Published: 2020-09-04<span class="divider">|</span>
 </li>
-          <li id="projectVersion">Version: 1.27-SNAPSHOT</li>
+          <li id="projectVersion">Version: 1.33-SNAPSHOT</li>
         </ul>
       </div>
       <div class="row-fluid">
@@ -319,7 +319,7 @@
 
 <p>All queries should have a path restriction (even if it&#x2019;s just, for example, &#x201c;/content&#x201d;), as this allows to shrink indexes.</p>
 <p>&#x201c;distinct&#x201d; ensures each row is only returned once.</p>
-<p>&#x201c;union&#x201d; combines the result of this query with the results of another query, where &#x201c;union all&#x201d; does not remove duplicates.</p>
+<p>&#x201c;union&#x201d; combines the result of this query with the results of another query, where &#x201c;union all&#x201d; does not remove duplicates. Note that for fulltext queries, it is problematic to use union, because scoring is done for each subquery individually. The score is not useful to compare results of different subqueries, so that the union of multiple fulltext queries won&#x2019;t be ordered by score as one might expect.</p>
 <p>&#x201c;order by&#x201d; may use an index. If there is no index for the given sort order, then the result is fully read in memory and sorted before returning the first row.</p>
 <p>Examples:</p>
 
@@ -421,7 +421,7 @@ cast('2020-12-01T20:00:00.000' as date)
 <hr /><h2><a name="ordering"></a>Ordering</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">simpleName</a></code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d">&nbsp;</td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">ASC</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">DESC</code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
 
 <p>Ordering by an indexed property will use that index if possible. If there is no index that can be used for the given sort order, then the result is fully read in memory and sorted there.</p>
-<p>As a special case, sorting by &#x201c;jcr:score&#x201d; in descending order is ignored (removed from the list), as this is what the fulltext index does anyway (and if no fulltext index is used, then the score doesn&#x2019;t apply). If for some reason you want to enforce sorting by &#x201c;jcr:score&#x201d;, then you can use the workaround to order by &#x201c;LOWER([jcr:score]) DESC&#x201d;.</p>
+<p>As a special case, sorting by &#x201c;jcr:score&#x201d; in descending order is ignored (removed from the list), as this is what the fulltext index does anyway (and if no fulltext index is used, then the score doesn&#x2019;t apply). If for some reason you want to enforce sorting by &#x201c;jcr:score&#x201d;, then you can use the workaround to order by &#x201c;LOWER([jcr:score]) DESC&#x201d;. Note that for fulltext queries, it is problematic to use union, because scoring is done for each subquery individually. The score is not useful to compare results of different subqueries, so that the union of multiple fulltext queries won&#x2019;t be ordered by score as one might expect.</p>
 <p>Examples:</p>
 
 <div>

Modified: jackrabbit/site/live/oak/docs/query/grammar-xpath.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/grammar-xpath.html?rev=1881461&r1=1881460&r2=1881461&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/grammar-xpath.html (original)
+++ jackrabbit/site/live/oak/docs/query/grammar-xpath.html Fri Sep  4 16:02:31 2020
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-04-22 
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-09-04 
  | Rendered using Apache Maven Fluido Skin 1.6
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20200422" />
+    <meta name="Date-Revision-yyyymmdd" content="20200904" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak &#x2013; Oak XPath Query Grammar - Oak Documentation</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
@@ -155,9 +155,9 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2020-04-22<span class="divider">|</span>
+        <li id="publishDate">Last Published: 2020-09-04<span class="divider">|</span>
 </li>
-          <li id="projectVersion">Version: 1.27-SNAPSHOT</li>
+          <li id="projectVersion">Version: 1.33-SNAPSHOT</li>
         </ul>
       </div>
       <div class="row-fluid">
@@ -341,7 +341,7 @@
 <p>A single slash means filtering on a specific child node, while two slashes means filtering on a descendant node.</p>
 <p>&#x201c;*&#x201d; means any node name, and any node type.</p>
 <p>&#x201c;text()&#x201d; is a shortcut for &#x201c;jcr:xmltext&#x201d;. It is supported only for compatibility.</p>
-<p>Queries using the construct `(filter1 | filter2)&#x2019; are converted to union, that is, one query is generated for each filter, and the result of both queries is combined.</p>
+<p>Queries using the construct `(filter1 | filter2)&#x2019; are converted to union, that is, one query is generated for each filter, and the result of both queries is combined. Note that for fulltext queries, it is problematic to use union, because scoring is done for each subquery individually. The score is not useful to compare results of different subqueries, so that the union of multiple fulltext queries won&#x2019;t be ordered by score as one might expect.</p>
 <p>Examples:</p>
 <p>Only direct child nodes of /content/dam:</p>
 
@@ -480,7 +480,7 @@ xs:dateTime('2020-12-01T20:00:00.000')
 <hr /><h2><a name="ordering"></a>Ordering</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#dynamic_operand">dynamicOperand</a></code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d">&nbsp;</td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">ascending</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">descending</code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
 
 <p>Ordering by an indexed property will use that index if possible. If there is no index that can be used for the given sort order, then the result is fully read in memory and sorted there.</p>
-<p>As a special case, sorting by &#x201c;jcr:score&#x201d; in descending order is ignored (removed from the list), as this is what the fulltext index does anyway (and if no fulltext index is used, then the score doesn&#x2019;t apply). If for some reason you want to enforce sorting by &#x201c;jcr:score&#x201d;, then you can use the workaround to order by &#x201c;fn:lowercase(@jcr:score) descending&#x201d;.</p>
+<p>As a special case, sorting by &#x201c;jcr:score&#x201d; in descending order is ignored (removed from the list), as this is what the fulltext index does anyway (and if no fulltext index is used, then the score doesn&#x2019;t apply). If for some reason you want to enforce sorting by &#x201c;jcr:score&#x201d;, then you can use the workaround to order by &#x201c;fn:lowercase(@jcr:score) descending&#x201d;. Note that for fulltext queries, it is problematic to use union, because scoring is done for each subquery individually. The score is not useful to compare results of different subqueries, so that the union of multiple fulltext queries won&#x2019;t be ordered by score as one might expect.</p>
 <p>Examples:</p>
 
 <div>

Modified: jackrabbit/site/live/oak/docs/security/authorization/restriction.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/security/authorization/restriction.html?rev=1881461&r1=1881460&r2=1881461&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/security/authorization/restriction.html (original)
+++ jackrabbit/site/live/oak/docs/security/authorization/restriction.html Fri Sep  4 16:02:31 2020
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-04-22 
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-09-04 
  | Rendered using Apache Maven Fluido Skin 1.6
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20200422" />
+    <meta name="Date-Revision-yyyymmdd" content="20200904" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak &#x2013; Restriction Management</title>
     <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
@@ -155,9 +155,9 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2020-04-22<span class="divider">|</span>
+        <li id="publishDate">Last Published: 2020-09-04<span class="divider">|</span>
 </li>
-          <li id="projectVersion">Version: 1.27-SNAPSHOT</li>
+          <li id="projectVersion">Version: 1.33-SNAPSHOT</li>
         </ul>
       </div>
       <div class="row-fluid">
@@ -410,10 +410,10 @@
 
 <tr class="b">
 <td> null          </td>
-<td> i.e. no restriction: matches /foo and all children       </td></tr>
+<td> i.e. no restriction: matches /foo and all descendants    </td></tr>
 <tr class="a">
 <td> &quot;&quot;            </td>
-<td> matches node /foo only                                   </td></tr>
+<td> matches node /foo only (no descendants, not even properties) </td></tr>
 </tbody>
 </table>
 <p>Examples including wildcard char:</p>
@@ -430,7 +430,7 @@
 <td> foo, siblings of foo and their descendants               </td></tr>
 <tr class="a">
 <td> /*cat        </td>
-<td> all child items of /foo whose paths end with &#x2018;cat&#x2019;       </td></tr>
+<td> all descendants of /foo whose paths end with &#x2018;cat&#x2019;       </td></tr>
 <tr class="b">
 <td> *cat         </td>
 <td> all siblings and descendants of foo that have a name ending with &#x2018;cat&#x2019; </td></tr>
@@ -465,19 +465,19 @@
 
 <tr class="b">
 <td> /cat          </td>
-<td>   the node /foo/cat and all it&#x2019;s child items             </td></tr>
+<td> &#x2018;/foo/cat&#x2019; and all it&#x2019;s descendants                      </td></tr>
 <tr class="a">
 <td> /cat/         </td>
-<td>   the descendants of the node /foo/cat                   </td></tr>
+<td> all descendants of &#x2018;/foo/cat&#x2019;                            </td></tr>
 <tr class="b">
 <td> cat           </td>
-<td>   the node /foocat and all it&#x2019;s child items              </td></tr>
+<td> &#x2018;/foocat&#x2019; and all it&#x2019;s descendants                       </td></tr>
 <tr class="a">
 <td> cat/          </td>
-<td>   all descendants of the node /foocat                    </td></tr>
+<td> all descendants of &#x2018;/foocat&#x2019;                             </td></tr>
 </tbody>
 </table>
-<p>See also <a class="externalLink" href="http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/GlobPattern.java?view=markup">GlobPattern</a> for implementation details.</p>
+<p>See also <a class="externalLink" href="http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/GlobPattern.java?view=markup">GlobPattern</a> for implementation details and the <a class="externalLink" href="http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/authorization/accesscontrol/L8_GlobRestrictionTest.java?view=markup">GlobRestrictionTest</a> in the <i>oak-exercise</i> module for training material.</p>
 <p><a name="representation"></a></p></div></div></div></div>
 <div class="section">
 <h3><a name="Representation_in_the_Repository"></a>Representation in the Repository</h3>
@@ -510,6 +510,7 @@
 
 <li>implement <tt>RestrictionProvider</tt> interface exposing your custom restriction(s).</li>
 <li>make the provider implementation an OSGi service and make it available to the Oak repository.</li>
+<li>make sure the <tt>RestrictionProvider</tt> is listed as required service with the <tt>SecurityProvider</tt> (see also <a href="../introduction.html#configuration">Introduction</a>)</li>
 </ul>
 <p>Please make sure to consider the following recommendations when implementing a custom <tt>RestrictionProvider</tt>: - restrictions are part of the overall permission evaluation and thus may heavily impact overall read/write performance - the hashCode generation of the base implementation (<tt>RestrictionImpl.hashCode</tt>) relies on <tt>PropertyStateValue.hashCode</tt>, which includes the internal String representation, which is not optimal for binaries (see also <a class="externalLink" href="https://issues.apache.org/jira/browse/OAK-5784">OAK-5784</a>)</p>
 <div class="section">