jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1835390 [10/23] - in /jackrabbit/site/live/oak/docs: ./ architecture/ coldstandby/ features/ nodestore/ nodestore/document/ nodestore/segment/ oak-mongo-js/ oak_api/ plugins/ query/ security/ security/accesscontrol/ security/authentication...
Date Mon, 09 Jul 2018 08:53:19 GMT
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=1835390&r1=1835389&r2=1835390&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/grammar-xpath.html (original)
+++ jackrabbit/site/live/oak/docs/query/grammar-xpath.html Mon Jul  9 08:53:17 2018
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2018-05-24 
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-07-09 
  | 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="20180524" />
+    <meta name="Date-Revision-yyyymmdd" content="20180709" />
     <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" />
@@ -136,7 +136,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-05-24<span class="divider">|</span>
+        <li id="publishDate">Last Published: 2018-07-09<span class="divider">|</span>
 </li>
           <li id="projectVersion">Version: 1.10-SNAPSHOT</li>
         </ul>
@@ -241,52 +241,39 @@
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-  --><div class="section">
+  -->
+<div class="section">
 <h2><a name="Oak_XPath_Query_Grammar_-_Oak_Documentation"></a>Oak XPath Query Grammar - Oak Documentation</h2>
-
 <ul>
-  
-<li>
-  <a href="#query">Query</a></li>
-  
-<li>
-  <a href="#filter">Filter</a></li>
-  
-<li>
-  <a href="#column">Column</a></li>
-  
-<li>
-  <a href="#constraint">Constraint</a></li>
-  
-<li>
-  <a href="#and_condition">And Condition</a></li>
-  
-<li>
-  <a href="#condition">Condition</a></li>
-  
-<li>
-  <a href="#comparison">Comparison</a></li>
-  
-<li>
-  <a href="#static_operand">Static Operand</a></li>
-  
-<li>
-  <a href="#ordering">Ordering</a></li>
-  
-<li>
-  <a href="#dynamic_operand">Dynamic Operand</a></li>
-  
-<li>
-  <a href="#options">Options</a></li>
-  
-<li>
-  <a href="#explain">Explain</a></li>
-  
-<li>
-  <a href="#measure">Measure</a></li>
-</ul>
-<hr />
-<h2><a name="query"></a>Query</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/jcr:root <a href="#filter">filter</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"><code class="c">...</code></td><td class="le"></td></tr></table></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="d"><code class="c">( <a href="#column">column</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="d"><code class="c">| ...</code></td></tr></t
 able></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">order by <a href="#ordering">ordering</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="d"><code class="c">, ...</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></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"><code class="c"><a href="#options">queryOptions</a></code></td><td class="le"></td></tr></table></td></tr></table>
+
+<li><a href="#query">Query</a>
+</li>
+<li><a href="#filter">Filter</a>
+</li>
+<li><a href="#column">Column</a>
+</li>
+<li><a href="#constraint">Constraint</a>
+</li>
+<li><a href="#and_condition">And Condition</a>
+</li>
+<li><a href="#condition">Condition</a>
+</li>
+<li><a href="#comparison">Comparison</a>
+</li>
+<li><a href="#static_operand">Static Operand</a>
+</li>
+<li><a href="#ordering">Ordering</a>
+</li>
+<li><a href="#dynamic_operand">Dynamic Operand</a>
+</li>
+<li><a href="#options">Options</a>
+</li>
+<li><a href="#explain">Explain</a>
+</li>
+<li><a href="#measure">Measure</a>
+</li>
+</ul><hr /><h2><a name="query"></a>Query</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/jcr:root <a href="#filter">filter</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"><code class="c">...</code></td><td class="le"></td></tr></table></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="d"><code class="c">( <a href="#column">column</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="d"><code class="c">| ...</code></
 td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">order by <a href="#ordering">ordering</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="d"><code class="c">, ...</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></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"><code class="c"><a href="#options">queryOptions</a></code></td><td class="le"></td></tr></table></td></tr></table>
+
 <p>The &#x201c;/jcr:root&#x201d; means the root node. It is recommended that all XPath queries start with this term.</p>
 <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;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>
@@ -294,21 +281,26 @@
 <p>Examples:</p>
 <p>Get all nodes of node type &#x2018;sling:Folder&#x2019; with the property &#x2018;sling:resourceType&#x2019; set to &#x2018;x&#x2019;:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content//element(*, sling:Folder)[@sling:resourceType='x']
+<div>
+<div>
+<pre class="source">/jcr:root/content//element(*, sling:Folder)[@sling:resourceType='x']
 </pre></div></div>
+
 <p>Get all index definition nodes of type &#x2018;lucene&#x2019;, sorted by reindex count, descending:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/oak:index/element(*, oak:QueryIndexDefinition)[@type='lucene'] order by @reindexCount descending
+<div>
+<div>
+<pre class="source">/jcr:root/oak:index/element(*, oak:QueryIndexDefinition)[@type='lucene'] order by @reindexCount descending
 </pre></div></div>
+
 <p>Get all nodes below /etc that have the property type set to &#x2018;report&#x2019;; fail the query if there is no index that can be used:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/etc//*[@type='report'] option(traversal fail)
+<div>
+<div>
+<pre class="source">/jcr:root/etc//*[@type='report'] option(traversal fail)
 </pre></div></div>
-<hr />
-<h2><a name="filter"></a>Filter</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/ <a href="#filter">directChildNodeFilter</a></code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/ / <a href="#filter">descendantNodeFilter</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">*</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">element (</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 clas
 s="railroad"><td class="ts"></td><td class="d"><code class="c">*</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c"><a href="#name">nodeName</a></code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">, <a href="#type">nodeType</a></code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">text()</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">[ <a href="#constraint
 ">constraint</a> ]</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">( <a href="#filter">filter</a> | <a href="#filter">unionFilter</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"><code class="c">...</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="filter"></a>Filter</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/ <a href="#filter">directChildNodeFilter</a></code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">/ / <a href="#filter">descendantNodeFilter</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">*</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">element (</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"><t
 r class="railroad"><td class="ts"></td><td class="d"><code class="c">*</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c"><a href="#name">nodeName</a></code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">, <a href="#type">nodeType</a></code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">text()</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">[ <a href="#cons
 traint">constraint</a> ]</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">( <a href="#filter">filter</a> | <a href="#filter">unionFilter</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"><code class="c">...</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <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>
@@ -316,54 +308,70 @@
 <p>Examples:</p>
 <p>Only direct child nodes of /content/dam:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content/dam/*
+<div>
+<div>
+<pre class="source">/jcr:root/content/dam/*
 </pre></div></div>
+
 <p>All descendant nodes of /content/oak:index:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content/oak:index//*
+<div>
+<div>
+<pre class="source">/jcr:root/content/oak:index//*
 </pre></div></div>
+
 <p>All nodes named &#x201c;rep:policy&#x201d; that have a parent node which is the direct child node of /home/users:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/home/users/*/rep:policy
+<div>
+<div>
+<pre class="source">/jcr:root/home/users/*/rep:policy
 </pre></div></div>
+
 <p>All nodes named &#x201c;profile&#x201d; that have a parent node which is a descendant of /home/users:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/home/users//*/profile
+<div>
+<div>
+<pre class="source">/jcr:root/home/users//*/profile
 </pre></div></div>
+
 <p>All descendant nodes of /content that are of type oak:QueryIndexDefinition:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content//element(*, oak:QueryIndexDefinition)
+<div>
+<div>
+<pre class="source">/jcr:root/content//element(*, oak:QueryIndexDefinition)
 </pre></div></div>
+
 <p>All descendant nodes of /content that are of type oak:QueryIndexDefinition and are named &#x201c;lucene&#x201d;:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content//element(lucene, oak:QueryIndexDefinition)
+<div>
+<div>
+<pre class="source">/jcr:root/content//element(lucene, oak:QueryIndexDefinition)
 </pre></div></div>
+
 <p>All nodes named &#x201c;indexRules&#x201d; that have a parent node with the property &#x201c;type&#x201d; set to &#x201c;lucene&#x201d;:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/oak:index/*[@type = 'lucene']/indexRules
+<div>
+<div>
+<pre class="source">/jcr:root/oak:index/*[@type = 'lucene']/indexRules
 </pre></div></div>
+
 <p>The paths &#x2018;/libs&#x2019; and &#x2018;/etc&#x2019; should be searched:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/(libs | etc)//*[@jcr:uuid and @jcr:mimeType = 'text/css']
+<div>
+<div>
+<pre class="source">/jcr:root/(libs | etc)//*[@jcr:uuid and @jcr:mimeType = 'text/css']
 </pre></div></div>
-<hr />
-<h2><a name="column"></a>Column</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:excerpt (</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">.</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></td><td 
 class="d"><code class="c"><a href="#name">@propertyName</a></code></td></tr></table></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:spellcheck ( )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:suggest (</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"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class=
 "d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:facet (</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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#name">@propertyName</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="column"></a>Column</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:excerpt (</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">.</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></t
 d><td class="d"><code class="c"><a href="#name">@propertyName</a></code></td></tr></table></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:spellcheck ( )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:suggest (</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"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td 
 class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:facet (</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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#name">@propertyName</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>&#x201c;rep:excerpt&#x201d;: include the excerpt in the result. Since Oak version 1.8.1, optionally a property name can be specified. See <a href="query-engine.html#Excerpts_and_Highlighting">Excerpts and Highlighting</a>.</p>
 <p>&#x201c;rep:spellcheck&#x201d;: Include the spellcheck in the result. See <a href="query-engine.html#Spellchecking">Spellchecking</a>.</p>
 <p>&#x201c;rep:suggest&#x201d;: include suggestions in the result. See <a href="query-engine.html#Suggestions">Suggestions</a>.</p>
 <p>&#x201c;rep:facet&#x201d;: include facets in the result. See <a href="query-engine.html#Facets">Facets</a>.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content//*[jcr:contains(., 'test')]/(rep:excerpt())
+<div>
+<div>
+<pre class="source">/jcr:root/content//*[jcr:contains(., 'test')]/(rep:excerpt())
 
 /jcr:root/content//*[jcr:contains(., 'test')]/(rep:excerpt(@jcr:title) | rep:excerpt())
 
@@ -371,26 +379,28 @@
 
 /jcr:root/content//*[jcr:contains(@jcr:title, 'oak')]/(rep:facet(@tags))
 </pre></div></div>
-<hr />
-<h2><a name="constraint"></a>Constraint</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#and_condition">andCondition</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="d"><code class="c">or <a href="#and_condition">andCondition</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"><code class="c">...</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+<hr /><h2><a name="constraint"></a>Constraint</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#and_condition">andCondition</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="d"><code class="c">or <a href="#and_condition">andCondition</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"><code class="c">...</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+
 <p>&#x201c;or&#x201d; conditions of the form &#x201c;@x = 1 or @x = 2&#x201d; can use the same index.</p>
 <p>&#x201c;or&#x201d; conditions of the form &#x201c;@x = 1 or @y = 2&#x201d; are more complicated. Oak will convert them to a &#x201c;union&#x201d; query (one query with @x = 1, and a second query with @y = 2).</p>
 <p>Examples:</p>
 <p>Include the nodes that have the property &#x2018;hidden&#x2019; set to &#x2018;hidden-folder&#x2019;, or don&#x2019;t have the property set:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/content/dam/*[@hidden='hidden-folder' or not(@hidden)]
+<div>
+<div>
+<pre class="source">/jcr:root/content/dam/*[@hidden='hidden-folder' or not(@hidden)]
 </pre></div></div>
-<hr />
-<h2><a name="and_condition"></a>And Condition</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#condition">condition</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="d"><code class="c">and <a href="#condition">condition</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"><code class="c">...</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+<hr /><h2><a name="and_condition"></a>And Condition</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#condition">condition</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="d"><code class="c">and <a href="#condition">condition</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"><code class="c">...</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+
 <p>A special case (not found in relational databases) is &#x201c;and&#x201d; conditions of the form &#x201c;@x = 1 and @x = 2&#x201d;. They will match nodes with multi-valued properties, where the property value contains both 1 and 2.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/home//element(*, rep:Authorizable)[@rep:principalName != 'Joe' and @rep:principalName != 'Steve']
+<div>
+<div>
+<pre class="source">/jcr:root/home//element(*, rep:Authorizable)[@rep:principalName != 'Joe' and @rep:principalName != 'Steve']
 </pre></div></div>
-<hr />
-<h2><a name="condition"></a>Condition</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#comparison">comparison</a> <a href="#comparison">inComparison</a></code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><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">fn:not</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">not</code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">( <a href="#constraint">constraint</a> )</code></td></tr>
 </table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">( <a href="#constraint">constraint</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">jcr:contains (</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="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#name">propertyName</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">,</code></td></tr><
 /table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">fulltextSearchExpression )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">jcr:like ( <a href="#dynamic_operand">dynamicOperand</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:similar ( <a href="#name">propertyName</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:native ( <a href="#name">languageName</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke">
 </td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:spellcheck ( <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:suggest ( <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="condition"></a>Condition</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#comparison">comparison</a> <a href="#comparison">inComparison</a></code></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><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">fn:not</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">not</code></td><td class="le"></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">( <a href="#constraint">constraint</a> )</code></td
 ></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">( <a href="#constraint">constraint</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">jcr:contains (</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="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#name">propertyName</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">,</code></td>
 </tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">fulltextSearchExpression )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">jcr:like ( <a href="#dynamic_operand">dynamicOperand</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:similar ( <a href="#name">propertyName</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:native ( <a href="#name">languageName</a> , <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class
 ="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:spellcheck ( <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">rep:suggest ( <a href="#static_operand">staticOperand</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>&#x201c;fn:not&#x201d;: this is used for both &#x201c;is not null&#x201d;, and for nested conditions. For example &#x201c;fn:not(@status)&#x201d; means nodes where this property is not set. In this case, and index can be used, but it is relatively expensive to index all nodes that don&#x2019;t have a certain property. It is recommended to only index this if there are relatively view nodes with this nodetype. See also <a href="lucene.html">nullCheckEnabled</a>. Nested conditions, for example &#x201c;fn:not(@status = &#x2018;x&#x2019; and @color = &#x2018;red&#x2019;)&#x201d;, can not typically use an index.</p>
 <p>&#x201c;jcr:contains&#x201d;: see <a href="query-engine.html#Full-Text_Queries">Full-Text Queries</a>.</p>
 <p>&#x201c;jcr:like&#x201d;: the wildcards characters are _ (any one character) and % (any characters). An index is used, except if the operand starts with a wildcard. To search for the characters % and _, the characters need to be escaped using \ (backslash).</p>
@@ -400,51 +410,56 @@
 <p>&#x201c;rep:suggest&#x201d;: see <a href="query-engine.html#Suggestions">Suggestions</a>.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">/jcr:root/var/eventing//element(*, slingevent:Job)[@event.job.topic = 'abc' and not(@slingevent:finishedState)]
+<div>
+<div>
+<pre class="source">/jcr:root/var/eventing//element(*, slingevent:Job)[@event.job.topic = 'abc' and not(@slingevent:finishedState)]
 
 /jcr:root/content//element(*, cq:Page)[@offTime &gt; xs:dateTime('2020-12-01T20:00:00.000') or @onTime &gt; xs:dateTime('2020-12-01T20:00:00.000')]
 </pre></div></div>
-<hr />
-<h2><a name="comparison"></a>Comparison</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"><code class="c">=</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&lt; &gt;</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">! =</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">&lt;</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&lt; =</code></td></tr></table></td><td class="ke"
 ></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">&gt;</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&gt; =</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#static_operand">staticOperand</a></code></td></tr></table>
+<hr /><h2><a name="comparison"></a>Comparison</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"><code class="c">=</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&lt; &gt;</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">! =</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">&lt;</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&lt; =</code></td></tr></table></td><td clas
 s="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">&gt;</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">&gt; =</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#static_operand">staticOperand</a></code></td></tr></table>
+
 <p>Comparison using &lt;, &gt;, &gt;=, and &lt;= can use an index if the property in the index is ordered.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">@jcr:primaryType != 'nt:base'
+<div>
+<div>
+<pre class="source">@jcr:primaryType != 'nt:base'
 @offTime &gt; xs:dateTime('2020-12-01T20:00:00.000')
 </pre></div></div>
-<hr />
-<h2><a name="static_operand"></a>Static Operand</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#literal">textLiteral</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">$ <a href="#name">bindVariableName</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><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">+</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">-</code></td><td class="le"></td></tr></table></td><td class="le"></
 td></tr></table></td><td class="d"><code class="c"><a href="#number_literal">numberLiteral</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">true</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="d"><code class="c">( )</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">false</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="d"><code class="c">( )</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">xs:dateTime ( <a href="#literal">literal</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="static_operand"></a>Static Operand</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#literal">textLiteral</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">$ <a href="#name">bindVariableName</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><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">+</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">-</code></td><td class="le"></td></tr></table></td><td class="
 le"></td></tr></table></td><td class="d"><code class="c"><a href="#number_literal">numberLiteral</a></code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">true</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="d"><code class="c">( )</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">false</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 cl
 ass="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">( )</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">xs:dateTime ( <a href="#literal">literal</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>A string (text) literal starts and ends with a single quote. Two single quotes can be used to create a single quote inside a string.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">'John''s car'
+<div>
+<div>
+<pre class="source">'John''s car'
 true()
 false
 1000
 -30.3
 xs:dateTime('2020-12-01T20:00:00.000')
 </pre></div></div>
-<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>
+<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>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">order by @jcr:created descending
+<div>
+<div>
+<pre class="source">order by @jcr:created descending
 </pre></div></div>
-<hr />
-<h2><a name="dynamic_operand"></a>Dynamic Operand</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#name">@propertyName</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">*</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d">
 <code class="c">fn:string-length ( <a href="#dynamic_operand">dynamicOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">fn:name</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">fn:local-name</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">(</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"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="rai
 lroad"><td class="d"><code class="c">jcr:score ( )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">fn:lower-case</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">fn:upper-case</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">( <a href="#dynamic_operand">dynamicOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">fn:coalesce ( <a href="#dynamic_operand">firstDynamicOperand</a> , <a href="#dynamic_operand">secondDynamicOperand</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="dynamic_operand"></a>Dynamic Operand</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><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="d"><code class="c"><a href="#path">relativePath</a> /</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#name">@propertyName</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">*</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td clas
 s="d"><code class="c">fn:string-length ( <a href="#dynamic_operand">dynamicOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">fn:name</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">fn:local-name</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">(</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"><code class="c">.</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr clas
 s="railroad"><td class="d"><code class="c">jcr:score ( )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">fn:lower-case</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">fn:upper-case</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">( <a href="#dynamic_operand">dynamicOperand</a> )</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">fn:coalesce ( <a href="#dynamic_operand">firstDynamicOperand</a> , <a href="#dynamic_operand">secondDynamicOperand</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>The &#x201c;*&#x201d; stands for any property. Using it in a condition requires a relative path. For example: <tt>[./* = 'test']</tt> means where any property matches the word &#x2018;test&#x2019;.</p>
 <p>&#x201c;jcr:score()&#x201d; is the score returned by the index.</p>
 <p>&#x201c;fn:coalesce&#x201d;: this returns the first operand if it is not null, and the second operand otherwise. <tt>@since Oak 1.8</tt></p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">@type
+<div>
+<div>
+<pre class="source">@type
 ./@jcr:primaryType
 items/type/@metaType
 indexRules/nt:base/*
@@ -454,47 +469,55 @@ jcr:score ()
 fn:lower-case(@lastName)
 fn:coalesce(@lastName, @name)
 </pre></div></div>
-<hr />
-<h2><a name="options"></a>Options</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">option (</code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">traversal</code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">ok</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">warn</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">fail</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">default</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">in
 dex tag <a href="#name">tagName</a></code></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">, ...</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table>
+<hr /><h2><a name="options"></a>Options</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">option (</code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">traversal</code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">ok</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">warn</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">fail</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">default</code></td><td class="le"></td></tr></table></td></tr></table></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class=
 "c">index tag <a href="#name">tagName</a></code></td></tr></table></td><td class="le"></td></tr></table></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="d"><code class="c">, ...</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">)</code></td></tr></table>
+
 <p>&#x201c;traversal&#x201d;: by default, queries without index will log a warning, except if the configuration option <tt>QueryEngineSettings.failTraversal</tt> is changed The traversal option can be used to change the behavior of the given query: &#x201c;ok&#x201d; to not log a warning, &#x201c;warn&#x201d; to log a warning, &#x201c;fail&#x201d; to fail the query, and &#x201c;default&#x201d; to use the default setting.</p>
 <p>&#x201c;index tag&#x201d;: by default, queries will use the index with the lowest expected cost (as in relational databases). To only consider some of the indexes, add tags (a multi-valued String property) to the index(es) of choice, and specify this tag in the query. See <a href="query-engine.html#Query_Option_Index_Tag">Query Option Index Tag</a>.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">option(traversal fail)
+<div>
+<div>
+<pre class="source">option(traversal fail)
 </pre></div></div>
-<hr />
-<h2><a name="explain"></a>Explain</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">explain</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"><code class="c">measure</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#query">query</a></code></td></tr></table>
+<hr /><h2><a name="explain"></a>Explain</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">explain</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"><code class="c">measure</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#query">query</a></code></td></tr></table>
+
 <p>Does not run the query, but only computes and returns the query plan. With &#x201c;explain measure&#x201d;, the expected cost is calculated as well. In both cases, the query result will only have one column called &#x2018;plan&#x2019;, and one row that contains the plan.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">exlplain measure /jcr:root//*[@jcr:uuid = 'x']
+<div>
+<div>
+<pre class="source">exlplain measure /jcr:root//*[@jcr:uuid = 'x']
 </pre></div></div>
+
 <p>Result:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">plan = [nt:base] as [nt:base] 
+<div>
+<div>
+<pre class="source">plan = [nt:base] as [nt:base] 
 /* property uuid = 1 where [nt:base].[jcr:uuid] = 1 */  
 cost: { &quot;nt:base&quot;: 2.0 } 
 </pre></div></div>
-<p>This means the property index named &#x201c;uuid&#x201d; is used for this query. The expected cost (roughly the number of uncached I/O operations) is 2.</p>
-<hr />
-<h2><a name="measure"></a>Measure</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">measure <a href="#query">query</a></code></td></tr></table>
-<p>Runs the query, but instead of returning the result, returns the number of rows traversed. The query result has two columns, one called &#x2018;selector&#x2019; and one called &#x2018;scanCount&#x2019;. The result has at least two rows, one that represents the total (selector set to &#x2018;query&#x2019;), and one per selector used in the query. </p>
+
+<p>This means the property index named &#x201c;uuid&#x201d; is used for this query. The expected cost (roughly the number of uncached I/O operations) is 2.</p><hr /><h2><a name="measure"></a>Measure</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c">measure <a href="#query">query</a></code></td></tr></table>
+
+<p>Runs the query, but instead of returning the result, returns the number of rows traversed. The query result has two columns, one called &#x2018;selector&#x2019; and one called &#x2018;scanCount&#x2019;. The result has at least two rows, one that represents the total (selector set to &#x2018;query&#x2019;), and one per selector used in the query.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">measure /jcr:root//*[@jcr:uuid = 'x']
+<div>
+<div>
+<pre class="source">measure /jcr:root//*[@jcr:uuid = 'x']
 </pre></div></div>
+
 <p>Result:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">selector = query
+<div>
+<div>
+<pre class="source">selector = query
 scanCount = 0
 selector = nt:base
 scanCount = 0
 </pre></div></div>
+
 <p>In this case, the scanCount is zero because the query did not find any nodes.</p></div>
         </div>
       </div>

Modified: jackrabbit/site/live/oak/docs/query/index-management.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/index-management.html?rev=1835390&r1=1835389&r2=1835390&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/index-management.html (original)
+++ jackrabbit/site/live/oak/docs/query/index-management.html Mon Jul  9 08:53:17 2018
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2018-05-24 
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2018-07-09 
  | 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="20180524" />
+    <meta name="Date-Revision-yyyymmdd" content="20180709" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak &#x2013; Index Management</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
@@ -136,7 +136,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-05-24<span class="divider">|</span>
+        <li id="publishDate">Last Published: 2018-07-09<span class="divider">|</span>
 </li>
           <li id="projectVersion">Version: 1.10-SNAPSHOT</li>
         </ul>
@@ -240,28 +240,34 @@
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-  --><div class="section">
+  -->
+<div class="section">
 <h2><a name="Index_Management"></a>Index Management</h2>
 <p>In Oak, indexes are managed using the JCR API.</p></div>
 <div class="section">
 <h2><a name="Index_Management_using_Oak-Run"></a>Index Management using Oak-Run</h2>
-<p><tt>@since 1.6.0</tt> </p>
+<p><tt>@since 1.6.0</tt></p>
 <p>Oak-Run support managing indexes using the &#x201c;branch-less&#x201d; mode, which avoids branch commits, which can be relatively slow on MongoDB. In this case, the repository must be accessed in standalone mode, meaning no other cluster nodes must run concurrently. The tool supports running scripts that contain index definition changes, as well an interative mode, for development. While developing scripts, it is typically a good idea to verify the <a class="externalLink" href="http://jsonlint.com/">Json is valid</a>. To start the interactive mode, with the branch-less commit option, and MongoDB, use:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">java -jar oak-run-*.jar json-index --disableBranches --script - \
+<div>
+<div>
+<pre class="source">java -jar oak-run-*.jar json-index --disableBranches --script - \
   mongodb://localhost:27017/oak --user admin --password admin
 </pre></div></div>
-<p>When using the segment store, use: </p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">java -jar oak-run-*.jar json-index --disableBranches --script - \
+<p>When using the segment store, use:</p>
+
+<div>
+<div>
+<pre class="source">java -jar oak-run-*.jar json-index --disableBranches --script - \
   repository/segmentstore --read-write --user admin --password admin
 </pre></div></div>
+
 <p>This will open the repository and allow to write and read from the repository. An example script creates an index &#x201c;test&#x201d;, and then re-indexes it:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">{&quot;addNode&quot;: &quot;/oak:index/test&quot;, &quot;node&quot;: {
+<div>
+<div>
+<pre class="source">{&quot;addNode&quot;: &quot;/oak:index/test&quot;, &quot;node&quot;: {
     &quot;jcr:primaryType&quot;: &quot;oak:QueryIndexDefinition&quot;, 
     &quot;type&quot;: &quot;property&quot;, &quot;{Name}propertyNames&quot;: [&quot;test&quot;]
 }}
@@ -271,40 +277,32 @@
 {&quot;session&quot;: &quot;save&quot;}
 {&quot;xpath&quot;: &quot;/jcr:root/oak:index/test&quot;, &quot;depth&quot;: 2}
 </pre></div></div>
+
 <p>This index is re-indexed as follows (note that reindexing is typically only needed if the index definition changes):</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">{&quot;setProperty&quot;: &quot;/oak:index/test/reindex&quot;, &quot;value&quot;: true}
+<div>
+<div>
+<pre class="source">{&quot;setProperty&quot;: &quot;/oak:index/test/reindex&quot;, &quot;value&quot;: true}
 {&quot;session&quot;: &quot;save&quot;}
 {&quot;xpath&quot;: &quot;/jcr:root/oak:index/test&quot;, &quot;depth&quot;: 2}
 </pre></div></div>
+
 <div class="section">
 <h3><a name="Command_Reference"></a>Command Reference</h3>
 <p>The following commands are available:</p>
-
 <ul>
-  
-<li>Add a node: <tt>{&quot;addNode&quot;: &quot;&lt;path&gt;&quot;, &quot;node&quot;: { ... }}</tt>.  Adding child nodes is supported.  Property types &#x201c;String&#x201d; and &#x201c;Boolean&#x201d; are automatically detected,  for other property types use the property name prefix <tt>{&lt;PropertTypeName&gt;}</tt>.  Ignored if the node already exists.</li>
-  
-<li>Add a node: <tt>{&quot;removeNode&quot;: &quot;&lt;path&gt;&quot;}</tt>.  Ignored if the node does not exist.</li>
-  
-<li>Set a property: <tt>{&quot;setProperty&quot;: &quot;&lt;path&gt;/&lt;propertyName&gt;&quot;, &quot;value&quot;: &lt;value&gt;}</tt>.  Ignored if the node does not exist.  Use the value <tt>null</tt> to remove a property.</li>
-  
+
+<li>Add a node: <tt>{&quot;addNode&quot;: &quot;&lt;path&gt;&quot;, &quot;node&quot;: { ... }}</tt>. Adding child nodes is supported. Property types &#x201c;String&#x201d; and &#x201c;Boolean&#x201d; are automatically detected, for other property types use the property name prefix <tt>{&lt;PropertTypeName&gt;}</tt>. Ignored if the node already exists.</li>
+<li>Add a node: <tt>{&quot;removeNode&quot;: &quot;&lt;path&gt;&quot;}</tt>. Ignored if the node does not exist.</li>
+<li>Set a property: <tt>{&quot;setProperty&quot;: &quot;&lt;path&gt;/&lt;propertyName&gt;&quot;, &quot;value&quot;: &lt;value&gt;}</tt>. Ignored if the node does not exist. Use the value <tt>null</tt> to remove a property.</li>
 <li>Save the changes: <tt>{&quot;session&quot;: &quot;save&quot;}</tt>.</li>
-  
-<li>Query using XPath: <tt>{&quot;xpath&quot;: &quot;&lt;query&gt;&quot;}</tt>.  Optionally, specify <tt>&quot;depth&quot;</tt> of the returned nodes.  Use <tt>&quot;quiet&quot;: true</tt> to disable output.  The result is stored in the variable <tt>$result</tt>, and  the number of rows is stored in the variable <tt>$resultSize</tt>.</li>
-  
-<li>Query using SQL-2: <tt>{&quot;sql&quot;: &quot;&lt;query&gt;&quot;}</tt>.  Otherwise same as for <tt>xpath</tt>.</li>
-  
+<li>Query using XPath: <tt>{&quot;xpath&quot;: &quot;&lt;query&gt;&quot;}</tt>. Optionally, specify <tt>&quot;depth&quot;</tt> of the returned nodes. Use <tt>&quot;quiet&quot;: true</tt> to disable output. The result is stored in the variable <tt>$result</tt>, and the number of rows is stored in the variable <tt>$resultSize</tt>.</li>
+<li>Query using SQL-2: <tt>{&quot;sql&quot;: &quot;&lt;query&gt;&quot;}</tt>. Otherwise same as for <tt>xpath</tt>.</li>
 <li>Print: <tt>{&quot;session&quot;: &quot;&lt;message&gt;&quot;}</tt>.</li>
-  
-<li>Set a variable: <tt>{&quot;$&lt;variableName&gt;&quot;: &lt;value&gt;}</tt>.  All variable are global.  Variable names can be used instead of values  and in queries.  Indirect addressing is available using <tt>$$</tt>.</li>
-  
+<li>Set a variable: <tt>{&quot;$&lt;variableName&gt;&quot;: &lt;value&gt;}</tt>. All variable are global. Variable names can be used instead of values and in queries. Indirect addressing is available using <tt>$$</tt>.</li>
 <li>Loop: <tt>{&quot;for&quot;: &quot;$&lt;variableName&gt;&quot;, &quot;do&quot;: [ &lt;commands&gt; ]}&quot;</tt>.</li>
-  
-<li>Endless loop: <tt>{&quot;loop&quot;: [ &lt;commands&gt; ]}&quot;</tt>.  Exit by setting the variable <tt>{&quot;$break&quot;: true}</tt>.</li>
-  
-<li>Conditional commands: <tt>{&lt;command&gt;, &quot;if&quot;: &lt;a&gt;, &quot;=&quot; &lt;b&gt;}</tt>.  This can be used for any commands.</li>
+<li>Endless loop: <tt>{&quot;loop&quot;: [ &lt;commands&gt; ]}&quot;</tt>. Exit by setting the variable <tt>{&quot;$break&quot;: true}</tt>.</li>
+<li>Conditional commands: <tt>{&lt;command&gt;, &quot;if&quot;: &lt;a&gt;, &quot;=&quot; &lt;b&gt;}</tt>. This can be used for any commands.</li>
 </ul></div>
 <div class="section">
 <h3><a name="Examples"></a>Examples</h3>
@@ -312,8 +310,9 @@
 <h4><a name="Reindex_Counter_Index"></a>Reindex Counter Index</h4>
 <p>The following script reindexes the counter index (in synchronous mode), and then switches it back to async mode.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">// reindex-counter.txt
+<div>
+<div>
+<pre class="source">// reindex-counter.txt
 // reindex the counter index
 {&quot;print&quot;: &quot;reindex count for counter index:&quot;}
 {&quot;sql&quot;: &quot;select [reindexCount] from [nt:base] where [jcr:path] = '/oak:index/counter'&quot;}
@@ -329,19 +328,23 @@
 {&quot;print&quot;: &quot;done&quot;}
 exit
 </pre></div></div>
+
 <p>Such scripts are typically stored as a text file (here <tt>reindex-counter.txt</tt>), and executed as follows:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">java -jar oak-run-1.6-SNAPSHOT.jar json-index --disableBranches \
+<div>
+<div>
+<pre class="source">java -jar oak-run-1.6-SNAPSHOT.jar json-index --disableBranches \
     --script reindex-counter.txt  
     mongodb://localhost:27017/oak
-</pre></div></div></div>
+</pre></div></div>
+</div>
 <div class="section">
 <h4><a name="Create_an_Index"></a>Create an Index</h4>
 <p>The following script created the index externalId:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">// create-externalId.txt
+<div>
+<div>
+<pre class="source">// create-externalId.txt
 // create a unique index on externalId
 {&quot;print&quot;: &quot;check if externalId already exists&quot;}
 {&quot;xpath&quot;: &quot;/jcr:root/oak:index/externalId&quot;}
@@ -361,13 +364,15 @@ exit
     {&quot;xpath&quot;: &quot;/jcr:root/oak:index/externalId&quot;, &quot;depth&quot;: 2}
 ]}
 exit
-</pre></div></div></div>
+</pre></div></div>
+</div>
 <div class="section">
 <h4><a name="Create_Nodes_for_Testing"></a>Create Nodes for Testing</h4>
 <p>The tool can also be used for testing queries, and creating nodes. The following creates 1000 nodes <tt>/test/n&lt;x&gt;</tt>, saving every 100 nodes:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">// create-nodex.txt
+<div>
+<div>
+<pre class="source">// create-nodex.txt
 // create 1000 nodes under /test/n&lt;x&gt;
 {&quot;removeNode&quot;: &quot;/test&quot;}
 {&quot;session&quot;: &quot;save&quot;}
@@ -388,15 +393,18 @@ exit
 {&quot;session&quot;: &quot;save&quot;}
 {&quot;print&quot;: &quot;done&quot;}
 exit
-</pre></div></div></div>
+</pre></div></div>
+</div>
 <div class="section">
 <h4><a name="Estimate_the_Number_of_Nodes"></a>Estimate the Number of Nodes</h4>
 <p>The following will estimate the number of nodes in a given subtree.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">{&quot;xpath&quot;: &quot;explain measure /jcr:root/content//* option(traversal ok)&quot;}
+<div>
+<div>
+<pre class="source">{&quot;xpath&quot;: &quot;explain measure /jcr:root/content//* option(traversal ok)&quot;}
 exit
 </pre></div></div>
+
 <p>The field &#x201c;cost&#x201d; will contain the number of estimated nodes.</p></div></div></div>
         </div>
       </div>



Mime
View raw message