jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1835390 [9/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-sql2.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/grammar-sql2.html?rev=1835390&r1=1835389&r2=1835390&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/grammar-sql2.html (original)
+++ jackrabbit/site/live/oak/docs/query/grammar-sql2.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 SQL-2 Query Grammar</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,116 +241,102 @@
    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_SQL-2_Query_Grammar"></a>Oak SQL-2 Query Grammar</h2>
-
 <ul>
-  
-<li>
-  <a href="#query">Query</a></li>
-  
-<li>
-  <a href="#column">Column</a></li>
-  
-<li>
-  <a href="#selector">Selector</a></li>
-  
-<li>
-  <a href="#join">Join</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="#in_comparison">In 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="#type">Type</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">SELECT</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">DISTINCT&#xa0;</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"><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"><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></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">FROM <a href="#selector">selector</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"><a href="#join">join</a> ...</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table><br /><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">WHERE <a href="#constraint">constraint</a></code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><table class="rai
 lroad"><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">UNION</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">ALL</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#query">query</a></code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table><br /><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">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="#column">Column</a>
+</li>
+<li><a href="#selector">Selector</a>
+</li>
+<li><a href="#join">Join</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="#in_comparison">In 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="#type">Type</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">SELECT</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">DISTINCT&#xa0;</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"><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"><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></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">FROM <a href="#selector">selector</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"><a href="#join">join</a> ...</code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table><br /><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">WHERE <a href="#constraint">constraint</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">UNION</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">ALL</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#query">query</a></code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table><br /><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">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>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;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>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">select * from [sling:Folder] as a where [sling:resourceType] = 'x' and isdescendantnode(a, '/content')
+<div>
+<div>
+<pre class="source">select * from [sling:Folder] as a where [sling:resourceType] = 'x' and isdescendantnode(a, '/content')
 select [jcr:path] from [oak:QueryIndexDefinition] as a where [type] = 'lucene' and isdescendantnode(a, '/') order by [reindexCount] desc
 select [jcr:path], [jcr:score], * from [nt:base] as a where [type] = 'report' and isdescendantnode(a, '/etc') option(traversal fail)
 </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"><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="#name">selectorName</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">EXC
 ERPT (</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"><a href="#name">selectorName</a></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 : SPELLCHECK ( )</code></td></tr></table></td><td class="le"></td></tr></table><br /><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">AS <a href="#name">columnName</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"><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="#name">selectorName</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">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"><code class="c"><a href="#name">selectorName</a></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 : SPELLCHECK ( )</code></td></tr></table></td><td class="le"></td></tr></table><br /><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">AS <a href="#name">columnName</a></code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>It is recommended to enclose property names in square brackets.</p>
 <p>For the &#x201c;excerpt&#x201d; property, see <a href="query-engine.html#Excerpts_and_Highlighting">Excerpts and Highlighting</a>.</p>
 <p>Not listed above are &#x201c;special&#x201d; properties such as &#x201c;[jcr:path]&#x201d; (the path), &#x201c;[jcr:score]&#x201d; (the score), &#x201c;[rep:suggest()]&#x201d;.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">*
+<div>
+<div>
+<pre class="source">*
 [jcr:path]
 [jcr:score]
 a.*
 a.[sling:resourceType]
 </pre></div></div>
-<hr />
-<h2><a name="selector"></a>Selector</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">nodeTypeName</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">AS <a href="#name">selectorName</a></code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+<hr /><h2><a name="selector"></a>Selector</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">nodeTypeName</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">AS <a href="#name">selectorName</a></code></td></tr></table></td><td class="le"></td></tr></table></td></tr></table>
+
 <p>The nodetype name can be either a primary nodetype or a mixin nodetype. It is recommended to specify the nodetype name in square brackes.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">[sling:Folder] as a
+<div>
+<div>
+<pre class="source">[sling:Folder] as a
 </pre></div></div>
-<hr />
-<h2><a name="join"></a>Join</h2><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">INNER</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"><code class="c">LEFT</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">RIGHT</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">OUTER</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">JOIN <a href="#selector">rightSelector</a> ON</code></td></tr></table><br /><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="#name">selectorName</
 a> . <a href="#name">propertyName</a> = <a href="#name">joinSelectorName</a> . <a href="#name">joinPropertyName</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">ISSAMENODE ( <a href="#name">selectorName</a> , <a href="#name">joinSelectorName</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">, <a href="#name">selectorPathName</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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">ISCHILDNODE ( <a hre
 f="#name">childSelectorName</a> , <a href="#name">parentSelectorName</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">ISDESCENDANTNODE ( <a href="#name">descendantSelectorName</a> , <a href="#name">ancestorSelectorName</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+<hr /><h2><a name="join"></a>Join</h2><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">INNER</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"><code class="c">LEFT</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">RIGHT</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">OUTER</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c">JOIN <a href="#selector">rightSelector</a> ON</code></td></tr></table><br /><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="#name">selector
 Name</a> . <a href="#name">propertyName</a> = <a href="#name">joinSelectorName</a> . <a href="#name">joinPropertyName</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">ISSAMENODE ( <a href="#name">selectorName</a> , <a href="#name">joinSelectorName</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">, <a href="#name">selectorPathName</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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">ISCHILDNODE ( 
 <a href="#name">childSelectorName</a> , <a href="#name">parentSelectorName</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">ISDESCENDANTNODE ( <a href="#name">descendantSelectorName</a> , <a href="#name">ancestorSelectorName</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>An &#x201c;inner join&#x201d; only returns entries if nodes are found on both the left and right selector. A &#x201c;left outer join&#x201d; will return entries that don&#x2019;t have matching nodes on the right selector. A &#x201c;right outer join&#x201d; will return entries that don&#x2019;t have matching nodes on the left selector. For outer joins, all the properties of the selector that doesn&#x2019;t have a matching node are null.</p>
 <p>Examples:</p>
 <p>All nodes below /oak:index that <i>don&#x2019;t</i> have a child node:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">select a.* from [oak:QueryIndexDefinition] as a 
+<div>
+<div>
+<pre class="source">select a.* from [oak:QueryIndexDefinition] as a 
   left outer join [nt:base] as b on ischildnode(b, a)
   where isdescendantnode(a, '/oak:index') 
   and b.[jcr:primaryType] is null 
   order by a.[jcr:path]
 </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; are automatically converted to &#x201c;[x] in(1, 2)&#x201d;, and can use the same an index.</p>
-<p>&#x201c;or&#x201d; conditions of the form &#x201c;[x]=1 or [y]=2&#x201d; are more complicated. Oak will try two options: first, what is the expected cost to use a &#x201c;union&#x201d; query (one query with x=1, and a second query with y=2). If using &#x201c;union&#x201d; results in a lower estimated cost, then &#x201c;union&#x201d; is used. This can be the case, for example, if there are two distinct indexes, one on x, and another on y.</p>
-<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>
-<hr />
-<h2><a name="condition"></a>Condition</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#comparison">comparison</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c"><a href="#in_comparison">inComparison</a></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">NOT <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"><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="#name">selectorName</a> .</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#name">propertyName</a> IS</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">NOT</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">NULL</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">CONTAINS (</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"><
 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="#name">selectorName</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="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="#name">selectorName</a> . *</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></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">ISSAMENODE</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">ISCHILDNODE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">ISDESCENDANTNODE</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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">selectorName</a> ,</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#name">pathName</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">SIMI
 LAR (</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="#name">selectorName</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><td class="d"><code class="c">, <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">NATIVE (</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="#name">selectorName</a> ,</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><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">SPELLCHECK (</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="#name">selectorName</a> ,</code></td></tr></table></td><td class="le"></td></tr></tabl
 e></td><td class="d"><code class="c"><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">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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">selectorName</a> ,</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></td><td class="le"></td></tr></table>
+<p>&#x201c;or&#x201d; conditions of the form &#x201c;[x]=1 or [y]=2&#x201d; are more complicated. Oak will try two options: first, what is the expected cost to use a &#x201c;union&#x201d; query (one query with x=1, and a second query with y=2). If using &#x201c;union&#x201d; results in a lower estimated cost, then &#x201c;union&#x201d; is used. This can be the case, for example, if there are two distinct indexes, one on x, and another on y.</p><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><hr /><h2><a name="condition"></a>Condition</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c"><a href="#comparison">comparison</a></code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c"><a href="#in_comparison">inComparison</a></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">NOT <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"><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="#name">selectorName</a> .</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><a href="#name">propertyName</a> IS</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">NOT</code></td><td class="le"></td></tr></table></td><td class="d"><code class="c">NULL</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><table c
 lass="railroad"><tr class="railroad"><td class="d"><code class="c">CONTAINS (</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"><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="#name">selectorName</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="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="#name">selectorName</a> . *</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></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">ISSAMENODE</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">ISCHILDNODE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">ISDESCENDANTNODE</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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">selectorName</a> ,</code></td></tr></table></td><td class="le"></td></tr></table></td><td cla
 ss="d"><code class="c"><a href="#name">pathName</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">SIMILAR (</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="#name">selectorName</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><td class="d"><code class="c">, <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">NATIVE (</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="#name">selectorName</a> ,</code></td></tr></table></td><td class="le"></td></tr></table></td><td class="d"><code class="c"><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">SPELLCHECK (</code></td><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d">&nbsp;</td><td clas
 s="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="#name">selectorName</a> ,</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></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">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"><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#name">selectorName</a> ,</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></td><
 td class="le"></td></tr></table>
+
 <p>&#x201c;not&#x201d; conditions can not typically use an index.</p>
 <p>&#x201c;contains&#x201d;: see <a href="query-engine.html#Full-Text_Queries">Full-Text Queries</a>.</p>
 <p>&#x201c;similar&#x201d;: see <a href="query-engine.html#Similarity_Queries">Similarity Queries</a>.</p>
@@ -359,50 +345,55 @@ a.[sling:resourceType]
 <p>&#x201c;suggest&#x201d;: see <a href="query-engine.html#Suggestions">Suggestions</a>.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">select [jcr:path] from [nt:base] where similar(*, '/test/a') 
+<div>
+<div>
+<pre class="source">select [jcr:path] from [nt:base] where similar(*, '/test/a') 
 select [jcr:path] from [nt:base] where native('solr', 'name:(Hello OR World)')
 select [rep:suggest()] from [nt:base] where suggest('in ') and issamenode('/')
 select [rep:spellcheck()] from [nt:base] as a where spellcheck('helo') and issamenode(a, '/')
 </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"><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="ks"></td><td class="d"><table cla
 ss="railroad"><tr class="railroad"><td class="d"><code class="c">&gt; =</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">LIKE</code></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>&#x201c;like&#x201d;: when comparing with LIKE, the wildcards characters are &#x2018;<i>&#x2018; (any one character) and &#x2019;%&#x2018; (any characters). An index is used, except if the operand starts with a wildcard. To search for the characters &#x2019;%&#x2018; and &#x2019;</i>&#x2019;, the characters need to be escaped using &#x2019;' (backslash).</p>
+<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"><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="ks"></td><td class="d"><tab
 le class="railroad"><tr class="railroad"><td class="d"><code class="c">&gt; =</code></td></tr></table></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">LIKE</code></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>&#x201c;like&#x201d;: when comparing with LIKE, the wildcards characters are &#x2018;_&#x2019; (any one character) and &#x2018;%&#x2019; (any characters). An index is used, except if the operand starts with a wildcard. To search for the characters &#x2018;%&#x2019; and &#x2018;_&#x2019;, the characters need to be escaped using &#x2019;' (backslash).</p>
 <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">[name] like '%: 100 \%'
+<div>
+<div>
+<pre class="source">[name] like '%: 100 \%'
 </pre></div></div>
-<hr />
-<h2><a name="in_comparison"></a>In Comparison</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#dynamic_operand">dynamicOperand</a> IN ( <a href="#static_operand">staticOperand</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>
+<hr /><h2><a name="in_comparison"></a>In Comparison</h2><table class="railroad"><tr class="railroad"><td class="d"><code class="c"><a href="#dynamic_operand">dynamicOperand</a> IN ( <a href="#static_operand">staticOperand</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>
+
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">[status] in('active', 'inactive')
+<div>
+<div>
+<pre class="source">[status] in('active', 'inactive')
 </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">literal</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="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">CAST ( <a href="#literal">literal</a> AS <a href="#type">type</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">literal</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="ls"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">CAST ( <a href="#literal">literal</a> AS <a href="#type">type</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>Example:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">'John''s car'
+<div>
+<div>
+<pre class="source">'John''s car'
 $uuid
 cast('2020-12-01T20:00:00.000' as date)
 </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="#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>
+<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>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">[lastName]
+<div>
+<div>
+<pre class="source">[lastName]
 [price] desc
 </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="#name">selectorName</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="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">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">NAME</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">LOCALNAME</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">SCORE</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"><a href="#name">selectorName</a></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="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d">
 <code class="c">LOWER</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">UPPER</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="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">COALESCE ( <a href="#dynamic_operand">dynamicOperand</a> , <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">PROPERTY ( <a href="#name">propertyName</a> , <a href="#type">type</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="#name">selectorName</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="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">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="rail
 road"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">NAME</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">LOCALNAME</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">SCORE</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"><a href="#name">selectorName</a></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="railroad"><td class="d"><table class="railroad"><tr class="railroad"><td class="ts"></td><td clas
 s="d"><code class="c">LOWER</code></td><td class="te"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">UPPER</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="ks"></td><td class="d"><table class="railroad"><tr class="railroad"><td class="d"><code class="c">COALESCE ( <a href="#dynamic_operand">dynamicOperand</a> , <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">PROPERTY ( <a href="#name">propertyName</a> , <a href="#type">type</a> )</code></td></tr></table></td><td class="le"></td></tr></table>
+
 <p>The selector name is only needed if the query contains multiple selectors.</p>
 <p>Property names can be relative, so that for example &#x2018;jcr:content/test&#x2019; means the property names &#x2018;test&#x2019; in the child node &#x2018;jcr:content&#x2019;.</p>
 <p>The wildcard &#x2018;*&#x2019; means any property.</p>
@@ -411,58 +402,66 @@ cast('2020-12-01T20:00:00.000' as date)
 <p>&#x201c;lower&#x201d;, &#x201c;upper&#x201d;, &#x201c;length&#x201d;: Indexes on functions are supported <tt>@since Oak 1.6</tt>, see OAK-3574.</p>
 <p>Examples:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint">lower([firstName])
+<div>
+<div>
+<pre class="source">lower([firstName])
 coalesce([lastName], name())
 length(coalesce([lastName], name()))
 [jcr:content/title]
 </pre></div></div>
-<hr />
-<h2><a name="type"></a>Type</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">STRING</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">BINARY</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DATE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">LONG</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DOUBLE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DECIMAL</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">BOOLEAN</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">NAME</code></td><td class="ke"></td></tr><tr class="railroad"><td class="k
 s"></td><td class="d"><code class="c">PATH</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">REFERENCE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">WEAKREFERENCE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">URI</code></td><td class="le"></td></tr></table>
-<p>This is the list of all JCR property types.</p>
-<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="type"></a>Type</h2><table class="railroad"><tr class="railroad"><td class="ts"></td><td class="d"><code class="c">STRING</code></td><td class="te"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">BINARY</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DATE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">LONG</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DOUBLE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">DECIMAL</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">BOOLEAN</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">NAME</code></td><td class="ke"></td></tr><tr class="railroad"><td cl
 ass="ks"></td><td class="d"><code class="c">PATH</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">REFERENCE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ks"></td><td class="d"><code class="c">WEAKREFERENCE</code></td><td class="ke"></td></tr><tr class="railroad"><td class="ls"></td><td class="d"><code class="c">URI</code></td><td class="le"></td></tr></table>
+
+<p>This is the list of all JCR property types.</p><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="railroa
 d"><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 EXPLAIN MEASURE, 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">explain measure 
+<div>
+<div>
+<pre class="source">explain measure 
 select * from [nt:base] where [jcr:uuid] = 1
 </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 
+<div>
+<div>
+<pre class="source">measure 
 select * from [nt:base] where [jcr:uuid] = 1
 </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>



Mime
View raw message