Added: 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/modifiers.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/modifiers.html
 (added)
+++ 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/modifiers.html
 Mon Sep 25 10:28:42 2017
@@ -0,0 +1,186 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    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.
+-->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Apache Sling - Modifiers</title>
+    <link rel="icon" href="/res/favicon.ico">
+    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" 
media="all">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="//sling.apache.org/">
+          <img border="0" alt="Apache Sling" src="/res/logo.svg">
+        </a>
+      </div>
+      <div class="header">
+        <a href="//www.apache.org/">
+          <img border="0" alt="Apache" src="/res/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p><strong><a href="/documentation.html">Documentation</a></strong> <br />
+<a href="/documentation/getting-started.html">Getting Started</a> <br />
+<a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br />
+<a href="/documentation/development.html">Development</a> <br />
+<a href="/documentation/bundles.html">Bundles</a> <br />
+<a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a> 
<br />
+<a href="/documentation/configuration.html">Configuration</a>   </p>
+<p><a href="http://s.apache.org/sling.wiki";>Wiki</a> <br />
+<a href="http://s.apache.org/sling.faq";>FAQ</a>   </p>
+<p><strong>API Docs</strong>  <br />
+<a href="/apidocs/sling9/index.html">Sling 9</a> <br />
+<a href="/apidocs/sling8/index.html">Sling 8</a> <br />
+<a href="/apidocs/sling7/index.html">Sling 7</a> <br />
+<a href="/apidocs/sling6/index.html">Sling 6</a> <br />
+<a href="/apidocs/sling5/index.html">Sling 5</a> <br />
+<a href="/javadoc-io.html">Archive at javadoc.io</a>   </p>
+<p><strong>Project info</strong> <br />
+<a href="/downloads.cgi">Downloads</a> <br />
+<a href="http://www.apache.org/licenses/";>License</a> <br />
+<a href="/contributing.html">Contributing</a> <br />
+<a href="/news.html">News</a> <br />
+<a href="/links.html">Links</a> <br />
+<a href="/project-information.html">Project Information</a> <br />
+<a href="https://issues.apache.org/jira/browse/SLING";>Issue Tracker</a> <br />
+<a href="http://ci.apache.org/builders/sling-trunk";>Build Server</a> <br />
+<a href="/project-information/security.html">Security</a>   </p>
+<p><strong>Source</strong> <br />
+<a href="http://svn.apache.org/viewvc/sling/trunk";>Subversion</a> <br />
+<a href="git://git.apache.org/sling.git">Git</a> <br />
+<a href="https://github.com/apache/sling";>Github Mirror</a>   </p>
+<p><strong>Sponsorship</strong> <br />
+<a href="http://www.apache.org/foundation/thanks.html";>Thanks</a> <br />
+<a href="http://www.apache.org/foundation/sponsorship.html";>Become a 
Sponsor</a> <br />
+<a href="http://www.apache.org/foundation/buy_stuff.html";>Buy Stuff</a>   </p>
+<p><strong><a href="/sitemap.html">Site Map</a></strong></p>
+<!-- no valid ads for now, we'll  reactivate this when needed
+<iframe 
+    src="http://www.apache.org/ads/button.html";
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+-->
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a 
href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles.html">Bundles</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles/sling-query.html">Sling Query</a>
+      </div>
+
+      
+      
+      <h1>Modifiers</h1>
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h3 id="eqindex"><code>:eq(index)</code><a class="headerlink" href="#eqindex" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to the one at the specified 0-based 
index. Example:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="nb">find</span><span class="p">(</span>&quot;<span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">richtext</span><span class="p">:</span><span class="n">eq</span><span 
class="p">(</span>2<span class="p">)</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="nb">find</span> <span 
class="n">the</span> <span class="n">third</span> <span 
class="n">richtext</span> <span class="n">in</span> <span class="n">the</span> 
<span class="n">subtree</span>
+</pre></div>
+
+
+<h3 id="even"><code>:even</code><a class="headerlink" href="#even" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to those which indexes are even 
numbers:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">even</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="n">get</span> <span 
class="n">even</span> <span class="n">children</span> <span 
class="n">pages</span> <span class="k">for</span> <span class="n">each</span> 
<span class="n">resource</span> <span class="n">in</span> <span 
class="n">the</span> <span class="n">collection</span>
+</pre></div>
+
+
+<h3 id="first"><code>:first</code><a class="headerlink" href="#first" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to the first one:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="nb">find</span><span class="p">(</span>&quot;<span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">richtext</span><span class="p">:</span><span 
class="n">first</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="nb">find</span> <span class="n">the</span> <span 
class="n">first</span> <span class="n">richtext</span> <span 
class="n">in</span> <span class="n">the</span> <span class="n">subtree</span>
+</pre></div>
+
+
+<h3 id="gtindex"><code>:gt(index)</code><a class="headerlink" href="#gtindex" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to those which indexes are greater than 
the argument:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">gt</span><span class="p">(</span>2<span 
class="p">)</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="n">filter</span> <span class="n">out</span> <span 
class="n">first</span> 3 <span class="n">pages</span>
+</pre></div>
+
+
+<h3 id="hasselector"><code>:has(selector)</code><a class="headerlink" 
href="#hasselector" title="Permanent link">&para;</a></h3>
+<p>Reduce the set of the matched elements to those which have descendant 
matching the selector:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">has</span><span class="p">(</span><span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">richtext</span><span class="p">)]</span>&quot;<span 
class="p">);</span> <span class="o">//</span> <span class="n">get</span> <span 
class="n">children</span> <span class="n">pages</span> <span 
class="n">containing</span> <span class="n">richtext</span> <span 
class="n">component</span>
+</pre></div>
+
+
+<h3 id="last"><code>:last</code><a class="headerlink" href="#last" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to the last one:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="nb">find</span><span class="p">(</span>&quot;<span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">richtext</span><span class="p">:</span><span 
class="n">last</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="nb">find</span> <span class="n">the</span> <span 
class="n">last</span> <span class="n">richtext</span> <span class="n">in</span> 
<span class="n">the</span> <span class="n">subtree</span>
+</pre></div>
+
+
+<h3 id="ltindex"><code>:lt(index)</code><a class="headerlink" href="#ltindex" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to those which indexes are lesser than 
the argument:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">lt</span><span class="p">(</span>3<span 
class="p">)</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="n">get</span> <span class="n">first</span> 3 <span 
class="n">matches</span>
+</pre></div>
+
+
+<h3 id="notselector"><code>:not(selector)</code><a class="headerlink" 
href="#notselector" title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to those which doesn't match the 
selector. The selector may contain other modifiers as well, however in this 
case the function will be evaluated eagerly:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="nb">find</span><span class="p">(</span>&quot;<span 
class="p">:</span><span class="n">not</span><span class="p">(:</span><span 
class="n">parent</span><span class="p">)</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="n">ancestor</span> <span 
class="n">resources</span> <span class="n">that</span> <span 
class="n">doesn</span><span class="o">&#39;</span><span class="n">t</span> 
<span class="n">contain</span> <span class="n">any</span> <span 
class="n">children</span>
+</pre></div>
+
+
+<h3 id="odd"><code>:odd</code><a class="headerlink" href="#odd" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of matched elements to those which indexes are odd 
numbers:</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">odd</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="n">get</span> <span class="n">odd</span> 
<span class="n">children</span> <span class="n">pages</span> <span 
class="k">for</span> <span class="n">each</span> <span 
class="n">resource</span> <span class="n">in</span> <span class="n">the</span> 
<span class="n">collection</span>
+</pre></div>
+
+
+<h3 id="parent"><code>:parent</code><a class="headerlink" href="#parent" 
title="Permanent link">&para;</a></h3>
+<p>Reduce the set of the matched elements to those which have any descendant 
resource.</p>
+<div class="codehilite"><pre>$<span class="p">(...).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="p">:</span><span class="n">parent</span><span 
class="p">]</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="n">get</span> <span class="n">children</span> <span 
class="n">resources</span> <span class="n">containing</span> <span 
class="n">any</span> <span class="n">resource</span>
+</pre></div>
+      <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
+        Rev. 1809599 by tomekr on Mon, 25 Sep 2017 10:28:26 +0000
+      </div>
+      <div class="trademarkFooter"> 
+        Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project
+        logo are trademarks of The Apache Software Foundation. All other marks 
mentioned
+        may be trademarks or registered trademarks of their respective owners.
+      </div>
+    </div>
+  </body>
+</html>

Added: 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/operators.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/operators.html
 (added)
+++ 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/operators.html
 Mon Sep 25 10:28:42 2017
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    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.
+-->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Apache Sling - Operators</title>
+    <link rel="icon" href="/res/favicon.ico">
+    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" 
media="all">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="//sling.apache.org/">
+          <img border="0" alt="Apache Sling" src="/res/logo.svg">
+        </a>
+      </div>
+      <div class="header">
+        <a href="//www.apache.org/">
+          <img border="0" alt="Apache" src="/res/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p><strong><a href="/documentation.html">Documentation</a></strong> <br />
+<a href="/documentation/getting-started.html">Getting Started</a> <br />
+<a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br />
+<a href="/documentation/development.html">Development</a> <br />
+<a href="/documentation/bundles.html">Bundles</a> <br />
+<a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a> 
<br />
+<a href="/documentation/configuration.html">Configuration</a>   </p>
+<p><a href="http://s.apache.org/sling.wiki";>Wiki</a> <br />
+<a href="http://s.apache.org/sling.faq";>FAQ</a>   </p>
+<p><strong>API Docs</strong>  <br />
+<a href="/apidocs/sling9/index.html">Sling 9</a> <br />
+<a href="/apidocs/sling8/index.html">Sling 8</a> <br />
+<a href="/apidocs/sling7/index.html">Sling 7</a> <br />
+<a href="/apidocs/sling6/index.html">Sling 6</a> <br />
+<a href="/apidocs/sling5/index.html">Sling 5</a> <br />
+<a href="/javadoc-io.html">Archive at javadoc.io</a>   </p>
+<p><strong>Project info</strong> <br />
+<a href="/downloads.cgi">Downloads</a> <br />
+<a href="http://www.apache.org/licenses/";>License</a> <br />
+<a href="/contributing.html">Contributing</a> <br />
+<a href="/news.html">News</a> <br />
+<a href="/links.html">Links</a> <br />
+<a href="/project-information.html">Project Information</a> <br />
+<a href="https://issues.apache.org/jira/browse/SLING";>Issue Tracker</a> <br />
+<a href="http://ci.apache.org/builders/sling-trunk";>Build Server</a> <br />
+<a href="/project-information/security.html">Security</a>   </p>
+<p><strong>Source</strong> <br />
+<a href="http://svn.apache.org/viewvc/sling/trunk";>Subversion</a> <br />
+<a href="git://git.apache.org/sling.git">Git</a> <br />
+<a href="https://github.com/apache/sling";>Github Mirror</a>   </p>
+<p><strong>Sponsorship</strong> <br />
+<a href="http://www.apache.org/foundation/thanks.html";>Thanks</a> <br />
+<a href="http://www.apache.org/foundation/sponsorship.html";>Become a 
Sponsor</a> <br />
+<a href="http://www.apache.org/foundation/buy_stuff.html";>Buy Stuff</a>   </p>
+<p><strong><a href="/sitemap.html">Site Map</a></strong></p>
+<!-- no valid ads for now, we'll  reactivate this when needed
+<iframe 
+    src="http://www.apache.org/ads/button.html";
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+-->
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a 
href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles.html">Bundles</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles/sling-query.html">Sling Query</a>
+      </div>
+
+      
+      
+      <h1>Operators</h1>
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h3 id="contains-namevalue">Contains <code>[name*=value]</code><a 
class="headerlink" href="#contains-namevalue" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> containing 
<code>value</code>:</p>
+<div class="codehilite"><pre><span class="c1">// select children pages titled 
&#39;foo&#39;, &#39;foo bar&#39;, &#39;bar foo bar&#39;, &#39;foofoofoo&#39;, 
etc.</span>
+<span class="err">$</span><span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span><span 
class="s">&quot;cq:Page[jcr:content/jcr:title*=foo]&quot;</span><span 
class="p">)</span>
+</pre></div>
+
+
+<h3 id="contains-a-word-namevalue">Contains a word 
<code>[name~=value]</code><a class="headerlink" 
href="#contains-a-word-namevalue" title="Permanent link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> containing word 
<code>value</code> delimited with spaces:</p>
+<div class="codehilite"><pre><span class="c1">// select children pages titled 
&#39;foo&#39;, &#39;foo bar&#39;, &#39;bar foo bar&#39;, but not 
&#39;foofoofoo&#39;</span>
+<span class="err">$</span><span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span><span 
class="s">&quot;cq:Page[jcr:content/jcr:title~=foo]&quot;</span><span 
class="p">)</span>
+</pre></div>
+
+
+<h3 id="ends-with-namevalue">Ends with <code>[name$=value]</code><a 
class="headerlink" href="#ends-with-namevalue" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> ending with 
<code>value</code>:</p>
+<div class="codehilite"><pre><span class="c1">// select children pages titled 
&#39;foo&#39;, &#39;bar foo&#39;, etc.</span>
+<span class="err">$</span><span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span><span 
class="s">&quot;cq:Page[jcr:content/jcr:title$=foo]&quot;</span><span 
class="p">)</span>
+</pre></div>
+
+
+<h3 id="equals-namevalue">Equals <code>[name=value]</code><a 
class="headerlink" href="#equals-namevalue" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> that equals to 
<code>value</code>:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">[</span><span class="n">jcr</span><span class="p">:</span><span 
class="n">content</span><span class="o">/</span><span class="n">jcr</span><span 
class="p">:</span><span class="n">title</span><span class="p">=</span><span 
class="n">foo</span><span class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<h3 id="not-equal-namevalue">Not equal <code>[name!=value]</code><a 
class="headerlink" href="#not-equal-namevalue" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> that not equals to 
<code>value</code>:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">[</span><span class="n">jcr</span><span class="p">:</span><span 
class="n">content</span><span class="o">/</span><span class="n">jcr</span><span 
class="p">:</span><span class="n">title</span>!<span class="p">=</span><span 
class="n">foo</span><span class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<h3 id="starts-with-namevalue">Starts with <code>[name^=value]</code><a 
class="headerlink" href="#starts-with-namevalue" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code> starting with 
<code>value</code>:</p>
+<div class="codehilite"><pre><span class="c1">// select children pages titled 
&#39;foo&#39;, &#39;foo bar&#39;, etc.</span>
+<span class="err">$</span><span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span><span 
class="s">&quot;cq:Page[jcr:content/jcr:title^=foo]&quot;</span><span 
class="p">)</span>
+</pre></div>
+
+
+<h3 id="has-attribute-name">Has attribute <code>[name]</code><a 
class="headerlink" href="#has-attribute-name" title="Permanent 
link">&para;</a></h3>
+<p>Select resources that have property <code>name</code>:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resources</span><span class="p">).</span><span 
class="nb">find</span><span class="p">(</span>&quot;<span 
class="p">[</span><span class="n">markerProperty</span><span 
class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+      <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
+        Rev. 1809599 by tomekr on Mon, 25 Sep 2017 10:28:26 +0000
+      </div>
+      <div class="trademarkFooter"> 
+        Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project
+        logo are trademarks of The Apache Software Foundation. All other marks 
mentioned
+        may be trademarks or registered trademarks of their respective owners.
+      </div>
+    </div>
+  </body>
+</html>

Added: 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/selectors.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/selectors.html
 (added)
+++ 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/selectors.html
 Mon Sep 25 10:28:42 2017
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    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.
+-->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Apache Sling - Selectors</title>
+    <link rel="icon" href="/res/favicon.ico">
+    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" 
media="all">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="//sling.apache.org/">
+          <img border="0" alt="Apache Sling" src="/res/logo.svg">
+        </a>
+      </div>
+      <div class="header">
+        <a href="//www.apache.org/">
+          <img border="0" alt="Apache" src="/res/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p><strong><a href="/documentation.html">Documentation</a></strong> <br />
+<a href="/documentation/getting-started.html">Getting Started</a> <br />
+<a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br />
+<a href="/documentation/development.html">Development</a> <br />
+<a href="/documentation/bundles.html">Bundles</a> <br />
+<a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a> 
<br />
+<a href="/documentation/configuration.html">Configuration</a>   </p>
+<p><a href="http://s.apache.org/sling.wiki";>Wiki</a> <br />
+<a href="http://s.apache.org/sling.faq";>FAQ</a>   </p>
+<p><strong>API Docs</strong>  <br />
+<a href="/apidocs/sling9/index.html">Sling 9</a> <br />
+<a href="/apidocs/sling8/index.html">Sling 8</a> <br />
+<a href="/apidocs/sling7/index.html">Sling 7</a> <br />
+<a href="/apidocs/sling6/index.html">Sling 6</a> <br />
+<a href="/apidocs/sling5/index.html">Sling 5</a> <br />
+<a href="/javadoc-io.html">Archive at javadoc.io</a>   </p>
+<p><strong>Project info</strong> <br />
+<a href="/downloads.cgi">Downloads</a> <br />
+<a href="http://www.apache.org/licenses/";>License</a> <br />
+<a href="/contributing.html">Contributing</a> <br />
+<a href="/news.html">News</a> <br />
+<a href="/links.html">Links</a> <br />
+<a href="/project-information.html">Project Information</a> <br />
+<a href="https://issues.apache.org/jira/browse/SLING";>Issue Tracker</a> <br />
+<a href="http://ci.apache.org/builders/sling-trunk";>Build Server</a> <br />
+<a href="/project-information/security.html">Security</a>   </p>
+<p><strong>Source</strong> <br />
+<a href="http://svn.apache.org/viewvc/sling/trunk";>Subversion</a> <br />
+<a href="git://git.apache.org/sling.git">Git</a> <br />
+<a href="https://github.com/apache/sling";>Github Mirror</a>   </p>
+<p><strong>Sponsorship</strong> <br />
+<a href="http://www.apache.org/foundation/thanks.html";>Thanks</a> <br />
+<a href="http://www.apache.org/foundation/sponsorship.html";>Become a 
Sponsor</a> <br />
+<a href="http://www.apache.org/foundation/buy_stuff.html";>Buy Stuff</a>   </p>
+<p><strong><a href="/sitemap.html">Site Map</a></strong></p>
+<!-- no valid ads for now, we'll  reactivate this when needed
+<iframe 
+    src="http://www.apache.org/ads/button.html";
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+-->
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a 
href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles.html">Bundles</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles/sling-query.html">Sling Query</a>
+      </div>
+
+      
+      
+      <h1>Selectors</h1>
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p>Selector string are something between filters and content descriptors. 
Selector can filter resources by their <a href="#resource-type">type</a>, <a 
href="#resource-name">name</a>, <a href="#attributes">attributes</a> and <a 
href="#modifiers">additional modifiers</a>. They can be also <a 
href="#joining-selectors">chained together</a> to describe more sophisticated 
hierarchy structure or <a href="#combining-selectors">combined with 
comma</a>.</p>
+<h2 id="syntax">Syntax<a class="headerlink" href="#syntax" title="Permanent 
link">&para;</a></h2>
+<p>Selector consists of four parts:</p>
+<h3 id="resource-type">Resource type<a class="headerlink" 
href="#resource-type" title="Permanent link">&para;</a></h3>
+<p>Resource type, which could be a <code>sling:resourceType</code>, like 
<code>foundation/components/richtext</code> or the underlying JCR node type, 
like <code>cq:Page</code> or <code>nt:unstructured</code>. In the latter case, 
SlingQuery takes types hierarchy into consideration (eg. <code>nt:base</code> 
matches everything). JCR mixin types could be used as well.</p>
+<h3 id="resource-name">Resource name<a class="headerlink" 
href="#resource-name" title="Permanent link">&para;</a></h3>
+<p>Resource name can be defined with a hash <code>#</code> character, after 
the resource type (or instead of it):</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span>#<span 
class="n">some</span><span class="o">-</span><span 
class="n">name</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<p>If the desired resource name contains colon (<code>:</code>) character, the 
whole string should be escaped with apostrophes:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;#<span 
class="s">&#39;jcr:content&#39;</span><span class="p">[</span><span 
class="n">jcr</span><span class="p">:</span><span class="n">title</span><span 
class="p">=</span><span class="n">My</span> <span class="n">title</span><span 
class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<h3 id="attributes">Attributes<a class="headerlink" href="#attributes" 
title="Permanent link">&para;</a></h3>
+<p>After the resource type and resource name one could pass a number of 
filtering attributes. Each attribute has following form: 
<code>[property=value]</code>. Passing multiple attributes will match only 
those resources that have all of them set. Property name could contain 
<code>/</code>. In this case property will be taken from the child resource, 
eg.:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">[</span><span class="n">jcr</span><span class="p">:</span><span 
class="n">content</span><span class="o">/</span><span class="n">jcr</span><span 
class="p">:</span><span class="n">title</span><span class="p">=</span><span 
class="n">My</span> <span class="n">title</span><span 
class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<p>will return only children of type <code>cq:Page</code> that have 
sub-resource called <code>jcr:content</code> with property 
<code>jcr:title</code> set to <code>My title</code>. Besides the <code>=</code> 
you may use other operators like <code>*=</code>, which means 
<em>contains</em>:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">[</span><span class="n">jcr</span><span class="p">:</span><span 
class="n">content</span><span class="o">/</span><span class="n">jcr</span><span 
class="p">:</span><span class="n">title</span><span class="o">*</span><span 
class="p">=</span><span class="n">title</span><span 
class="p">]</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<p>See the <a href="Operator list">fulll list of operators</a>.</p>
+<h3 id="modifiers">Modifiers<a class="headerlink" href="#modifiers" 
title="Permanent link">&para;</a></h3>
+<p>At the end of the selector one could define any number of modifiers that 
will be used to filter out the resources matched by the resource type and 
attributes. Each modifier starts with colon, some of them accepts a parameter 
set in parentheses. Example:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span><span 
class="p">:</span><span class="n">first</span>&quot;<span class="p">);</span>
+$<span class="p">(</span><span class="n">resource</span><span 
class="p">).</span><span class="n">children</span><span 
class="p">(</span>&quot;<span class="n">cq</span><span class="p">:</span><span 
class="n">Page</span><span class="p">:</span><span class="n">eq</span><span 
class="p">(</span>0<span class="p">)</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="n">the</span> <span class="n">same</span>
+$<span class="p">(</span><span class="n">resource</span><span 
class="p">).</span><span class="n">children</span><span 
class="p">(</span>&quot;<span class="p">:</span><span 
class="n">first</span>&quot;<span class="p">);</span> <span class="o">//</span> 
<span class="n">modifier</span> <span class="n">can</span> <span 
class="n">be</span> <span class="n">used</span> <span class="n">alone</span>
+</pre></div>
+
+
+<p>It is important that modifier filters out sub-collection created for each 
node, before it is merged. Eg.:, there is a difference between:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource1</span><span class="p">,</span> <span 
class="n">resource2</span><span class="p">).</span><span 
class="n">children</span><span class="p">().</span><span 
class="n">first</span><span class="p">();</span>
+</pre></div>
+
+
+<p>and</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource1</span><span class="p">,</span> <span 
class="n">resource2</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="p">:</span><span class="n">first</span>&quot;<span class="p">);</span>
+</pre></div>
+
+
+<p>In the first case we create a new collection consisting of children of the 
<code>resource1</code> and <code>resource2</code> and then we get the first 
element of the merged collection. On the other hand, the second example takes 
<em>first child</em> of each resource and creates a collection from them.</p>
+<p>See the <a href="Modifier list">full list of modifiers</a>.</p>
+<h2 id="joining-selectors">Joining selectors<a class="headerlink" 
href="#joining-selectors" title="Permanent link">&para;</a></h2>
+<p>Selectors can be joined together using <a href="Hierarchy operator 
list">hierarchy operators</a>. This feature enables the developer to create 
sophisticated filters describing desired resource structure, eg.:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;<span 
class="n">cq</span><span class="p">:</span><span class="n">Page</span> <span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">parsys</span> <span class="o">&gt;</span> <span 
class="n">foundation</span><span class="o">/</span><span 
class="n">components</span><span class="o">/</span><span 
class="n">richtext</span>&quot;<span class="p">)</span>
+</pre></div>
+
+
+<p>will all <code>cq:Page</code>s containing paragraph systems with a richtext 
inside.</p>
+<h2 id="combining-selectors">Combining selectors<a class="headerlink" 
href="#combining-selectors" title="Permanent link">&para;</a></h2>
+<p>You may specify any number of selectors to combine into a single result. 
Use comma to join a few conditions. Comma is treated as <code>OR</code> 
statement:</p>
+<div class="codehilite"><pre>$<span class="p">(</span><span 
class="n">resource</span><span class="p">).</span><span 
class="n">children</span><span class="p">(</span>&quot;#<span 
class="n">en</span><span class="p">,</span> #<span class="n">de</span><span 
class="p">,</span> #<span class="n">fr</span>&quot;<span class="p">);</span> 
<span class="o">//</span> <span class="k">return</span> <span 
class="n">all</span> <span class="n">direct</span> <span 
class="n">children</span> <span class="n">named</span> `<span 
class="n">en</span>` <span class="n">or</span> `<span class="n">de</span>` 
<span class="n">or</span> `<span class="n">fr</span>`<span class="p">.</span>
+</pre></div>
+      <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
+        Rev. 1809599 by tomekr on Mon, 25 Sep 2017 10:28:26 +0000
+      </div>
+      <div class="trademarkFooter"> 
+        Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project
+        logo are trademarks of The Apache Software Foundation. All other marks 
mentioned
+        may be trademarks or registered trademarks of their respective owners.
+      </div>
+    </div>
+  </body>
+</html>

Added: 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/vs-jcr.html
==============================================================================
--- 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/vs-jcr.html
 (added)
+++ 
websites/staging/sling/trunk/content/documentation/bundles/sling-query/vs-jcr.html
 Mon Sep 25 10:28:42 2017
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    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.
+-->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Apache Sling - Sling Query vs JCR</title>
+    <link rel="icon" href="/res/favicon.ico">
+    <link rel="stylesheet" href="/res/site.css" type="text/css" media="all">
+    <link rel="stylesheet" href="/res/codehilite.css" type="text/css" 
media="all">
+  </head>
+  <body>
+    <div class="title">
+      <div class="logo">
+        <a href="//sling.apache.org/">
+          <img border="0" alt="Apache Sling" src="/res/logo.svg">
+        </a>
+      </div>
+      <div class="header">
+        <a href="//www.apache.org/">
+          <img border="0" alt="Apache" src="/res/apache.png">
+        </a>
+      </div>
+    </div>
+    
+    <div class="menu"> 
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p><strong><a href="/documentation.html">Documentation</a></strong> <br />
+<a href="/documentation/getting-started.html">Getting Started</a> <br />
+<a href="/documentation/the-sling-engine.html">The Sling Engine</a> <br />
+<a href="/documentation/development.html">Development</a> <br />
+<a href="/documentation/bundles.html">Bundles</a> <br />
+<a href="/documentation/tutorials-how-tos.html">Tutorials &amp; How-Tos</a> 
<br />
+<a href="/documentation/configuration.html">Configuration</a>   </p>
+<p><a href="http://s.apache.org/sling.wiki";>Wiki</a> <br />
+<a href="http://s.apache.org/sling.faq";>FAQ</a>   </p>
+<p><strong>API Docs</strong>  <br />
+<a href="/apidocs/sling9/index.html">Sling 9</a> <br />
+<a href="/apidocs/sling8/index.html">Sling 8</a> <br />
+<a href="/apidocs/sling7/index.html">Sling 7</a> <br />
+<a href="/apidocs/sling6/index.html">Sling 6</a> <br />
+<a href="/apidocs/sling5/index.html">Sling 5</a> <br />
+<a href="/javadoc-io.html">Archive at javadoc.io</a>   </p>
+<p><strong>Project info</strong> <br />
+<a href="/downloads.cgi">Downloads</a> <br />
+<a href="http://www.apache.org/licenses/";>License</a> <br />
+<a href="/contributing.html">Contributing</a> <br />
+<a href="/news.html">News</a> <br />
+<a href="/links.html">Links</a> <br />
+<a href="/project-information.html">Project Information</a> <br />
+<a href="https://issues.apache.org/jira/browse/SLING";>Issue Tracker</a> <br />
+<a href="http://ci.apache.org/builders/sling-trunk";>Build Server</a> <br />
+<a href="/project-information/security.html">Security</a>   </p>
+<p><strong>Source</strong> <br />
+<a href="http://svn.apache.org/viewvc/sling/trunk";>Subversion</a> <br />
+<a href="git://git.apache.org/sling.git">Git</a> <br />
+<a href="https://github.com/apache/sling";>Github Mirror</a>   </p>
+<p><strong>Sponsorship</strong> <br />
+<a href="http://www.apache.org/foundation/thanks.html";>Thanks</a> <br />
+<a href="http://www.apache.org/foundation/sponsorship.html";>Become a 
Sponsor</a> <br />
+<a href="http://www.apache.org/foundation/buy_stuff.html";>Buy Stuff</a>   </p>
+<p><strong><a href="/sitemap.html">Site Map</a></strong></p>
+<!-- no valid ads for now, we'll  reactivate this when needed
+<iframe 
+    src="http://www.apache.org/ads/button.html";
+    style="border-width:0; float: left" frameborder="0" 
+    scrolling="no"
+    width="135" 
+    height="135">
+</iframe>
+-->
+    </div>
+    
+    <div class="main">
+      <div class="breadcrump" style="font-size: 80%;">
+        <a href="/">Home</a>&nbsp;&raquo&nbsp;<a 
href="/documentation.html">Documentation</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles.html">Bundles</a>&nbsp;&raquo&nbsp;<a 
href="/documentation/bundles/sling-query.html">Sling Query</a>
+      </div>
+
+      
+      
+      <h1>Sling Query vs JCR</h1>
+      <style type="text/css">
+/* The following code is added by mdx_elementid.py
+   It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+  visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, 
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, 
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p>Sling Query is not meant to replace JCR queries (XPath, JCR-SQL, JCR-SQL2). 
It doesn't use indexes and generally in queries traversing large subtrees (like 
<code>/</code> or <code>/content</code> or <code>/content/mysite/en</code>) 
it'll be much slower than well written JCR query.</p>
+<p>Purpose of the SlingQuery is to provide a convenient way to traverse 
resource tree. All SlingQuery operations are eventually transformed into a 
series of <code>listChildren()</code> and <code>getParent()</code> operations 
[1].</p>
+<p>As a rule of thumb - if you have a complex Java loop reading resource 
children or parents and processing them somehow, rewritting it to SlingQuery 
will be a good choice. If you have a recursive method trying to get some 
resource ancestor, using SlingQuery will be a good choice. On the other hand, 
if you have a large resource subtree and want to find all 
<code>cq:Page</code>s, using SlingQuery is a bad choice.</p>
+<table class="table">
+<thead>
+<tr>
+<th>Description</th>
+<th>JCR query</th>
+<th>SlingQuery</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>You have a complex logic using Sling Resource API</td>
+<td>-</td>
+<td>Yes!</td>
+</tr>
+<tr>
+<td>You want to find resource ancestor</td>
+<td>-</td>
+<td>Yes!</td>
+</tr>
+<tr>
+<td>You want to find all descendants with given attribute</td>
+<td>Yes!</td>
+<td>-</td>
+</tr>
+<tr>
+<td>You want to find all descendants of given type</td>
+<td>Yes!</td>
+<td>-</td>
+</tr>
+<tr>
+<td>You'd like to get ordered results</td>
+<td>Yes!</td>
+<td>-</td>
+</tr>
+</tbody>
+</table>
+<p>[1] - Actually, the <code>find()</code> operation uses QUERY strategy by 
default, which means that the selector string is transformed to a SQL2 query. 
However, the transformation process is very naïve and simply skips all 
conditions that can't be easily transformed to SQL2 (eg. selector 
<code>[jcr:content/jcr:title=some title]</code> won't be transformed as it 
contains some subresource reference). The result of this query is then filtere 
manually. See <a href="Method list#searchstrategystrategy">searchStrategy</a> 
for more details.</p>
+      <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
+        Rev. 1809599 by tomekr on Mon, 25 Sep 2017 10:28:26 +0000
+      </div>
+      <div class="trademarkFooter"> 
+        Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project
+        logo are trademarks of The Apache Software Foundation. All other marks 
mentioned
+        may be trademarks or registered trademarks of their respective owners.
+      </div>
+    </div>
+  </body>
+</html>


Reply via email to