jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1599515 [2/2] - in /jackrabbit/site/live/oak/docs: ./ architecture/ nodestore/ oak_api/ plugins/ security/ security/accesscontrol/ security/authentication/ security/permission/ security/principal/ security/privilege/ security/user/
Date Tue, 03 Jun 2014 12:43:06 GMT
Added: jackrabbit/site/live/oak/docs/solr.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/solr.html?rev=1599515&view=auto
==============================================================================
--- jackrabbit/site/live/oak/docs/solr.html (added)
+++ jackrabbit/site/live/oak/docs/solr.html Tue Jun  3 12:43:05 2014
@@ -0,0 +1,638 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2014-06-03
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20140603" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Jackrabbit Oak - The Query Engine</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+    
+            </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit-oak">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="index.html"  title="Jackrabbit Oak">Jackrabbit
Oak</a>
+</li>
+                  
+                      <li>      <a href="license.html"  title="License">License</a>
+</li>
+                  
+                      <li>      <a href="downloads.html"  title="Downloads">Downloads</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Concepts and Architecture
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="architecture/overview.html"  title="Overview">Overview</a>
+</li>
+                  
+                      <li>      <a href="architecture/nodestate.html"  title="The
node state model">The node state model</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Main APIs <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.day.com/specs/jcr/2.0/index.html"
 title="JCR API">JCR API</a>
+</li>
+                  
+                      <li>      <a href="oak_api/overview.html"  title="Oak API">Oak
API</a>
+</li>
+                  
+                      <li>      <a href="nodestore/overview.html"  title="NodeStore
and MicroKernel API">NodeStore and MicroKernel API</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Features and Plugins
<b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="query.html"  title="Query">Query</a>
+</li>
+                  
+                      <li>      <a href="security/overview.html"  title="Security">Security</a>
+</li>
+                  
+                      <li>      <a href="plugins/blobstore.html"  title="BlobStore">BlobStore</a>
+</li>
+                  
+                      <li>      <a href="clustering.html"  title="Clustering">Clustering</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Using Oak <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="use_getting_started.html"  title="Getting
Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="construct.html"  title="Repository construction">Repository
construction</a>
+</li>
+                  
+                      <li>      <a href="osgi_config.html"  title="Configuring Oak">Configuring
Oak</a>
+</li>
+                  
+                      <li>      <a href="differences.html"  title="Differences to
Jackrabbit 2">Differences to Jackrabbit 2</a>
+</li>
+                  
+                      <li>      <a href="known_issues.html"  title="Known Issues">Known
Issues</a>
+</li>
+                  
+                      <li>      <a href="dos_and_donts.html"  title="Dos and don'ts">Dos
and don'ts</a>
+</li>
+                  
+                      <li>      <a href="FAQ.html"  title="FAQ">FAQ</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Developing Oak <b
class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="dev_getting_started.html"  title="Getting
Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="participating.html"  title="Participating">Participating</a>
+</li>
+                  
+                      <li>      <a href="apidocs/index.html"  title="API docs">API
docs</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Links <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://jackrabbit.apache.org/oak"  title="Apache
Jackrabbit Oak">Apache Jackrabbit Oak</a>
+</li>
+                  
+                      <li>      <a href="http://jackrabbit.apache.org/"  title="Apache
Jackrabbit">Apache Jackrabbit</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Oak Documentation</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2014-06-03</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.1-SNAPSHOT</li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Overview</li>
+                                
+      <li>
+    
+                          <a href="index.html" title="Jackrabbit Oak">
+          <i class="none"></i>
+        Jackrabbit Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="license.html" title="License">
+          <i class="none"></i>
+        License</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                              <li class="nav-header">Concepts and Architecture</li>
+                                
+      <li>
+    
+                          <a href="architecture/overview.html" title="Overview">
+          <i class="none"></i>
+        Overview</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="architecture/nodestate.html" title="The node state
model">
+          <i class="none"></i>
+        The node state model</a>
+            </li>
+                              <li class="nav-header">Main APIs</li>
+                                
+      <li>
+    
+                          <a href="http://www.day.com/specs/jcr/2.0/index.html" class="externalLink"
title="JCR API">
+          <i class="none"></i>
+        JCR API</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="oak_api/overview.html" title="Oak API">
+          <i class="none"></i>
+        Oak API</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="nodestore/overview.html" title="NodeStore and MicroKernel
API">
+          <i class="none"></i>
+        NodeStore and MicroKernel API</a>
+            </li>
+                              <li class="nav-header">Features and Plugins</li>
+                                
+      <li>
+    
+                          <a href="query.html" title="Query">
+          <i class="none"></i>
+        Query</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="security/overview.html" title="Security">
+          <i class="none"></i>
+        Security</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="plugins/blobstore.html" title="BlobStore">
+          <i class="none"></i>
+        BlobStore</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="clustering.html" title="Clustering">
+          <i class="none"></i>
+        Clustering</a>
+            </li>
+                              <li class="nav-header">Using Oak</li>
+                                
+      <li>
+    
+                          <a href="use_getting_started.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="construct.html" title="Repository construction">
+          <i class="none"></i>
+        Repository construction</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="osgi_config.html" title="Configuring Oak">
+          <i class="none"></i>
+        Configuring Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="differences.html" title="Differences to Jackrabbit
2">
+          <i class="none"></i>
+        Differences to Jackrabbit 2</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="known_issues.html" title="Known Issues">
+          <i class="none"></i>
+        Known Issues</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="dos_and_donts.html" title="Dos and don'ts">
+          <i class="none"></i>
+        Dos and don'ts</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="FAQ.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                              <li class="nav-header">Developing Oak</li>
+                                
+      <li>
+    
+                          <a href="dev_getting_started.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="participating.html" title="Participating">
+          <i class="none"></i>
+        Participating</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="apidocs/index.html" title="API docs">
+          <i class="none"></i>
+        API docs</a>
+            </li>
+                              <li class="nav-header">Links</li>
+                                
+      <li>
+    
+                          <a href="http://jackrabbit.apache.org/oak" class="externalLink"
title="Apache Jackrabbit Oak">
+          <i class="none"></i>
+        Apache Jackrabbit Oak</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="http://jackrabbit.apache.org/" class="externalLink"
title="Apache Jackrabbit">
+          <i class="none"></i>
+        Apache Jackrabbit</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://jackrabbit.apache.org/oak-doc/" data-size="tall"
></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven"
class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png"
/>
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- 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. --><div class="section">
+<h2>The Query Engine<a name="The_Query_Engine"></a></h2>
+<p>Oak does not index content by default as does Jackrabbit 2. You need to create custom
indexes when necessary, much like in traditional RDBMSs. If there is no index for a specific
query, then the repository will be traversed. That is, the query will still work but probably
be very slow.</p>
+<p>Query Indices are defined under the <tt>oak:index</tt> node.</p>
+<div class="section">
+<h3>Compatibility<a name="Compatibility"></a></h3>
+<div class="section">
+<h4>Quoting<a name="Quoting"></a></h4>
+<p>The query parser is now generally more strict about invalid syntax. The following
query used to work in Jackrabbit 2.x, but not in Oak, because multiple way to quote the path
are used at the same time:</p>
+
+<div class="source">
+<pre>SELECT * FROM [nt:base] AS s 
+WHERE ISDESCENDANTNODE(s, [&quot;/libs/sling/config&quot;])
+</pre></div>
+<p>Instead, the query now needs to be:</p>
+
+<div class="source">
+<pre>SELECT * FROM [nt:base] AS s 
+WHERE ISDESCENDANTNODE(s, [/libs/sling/config])
+</pre></div></div>
+<div class="section">
+<h4>Equality for Path Constraints<a name="Equality_for_Path_Constraints"></a></h4>
+<p>In Jackrabbit 2.x, the following condition was interpreted as a LIKE condition:</p>
+
+<div class="source">
+<pre>SELECT * FROM nt:base WHERE jcr:path = '/abc/%'
+</pre></div>
+<p>Therefore, the query behaves exactly the same as if LIKE was used. In Oak, this
is no longer the case, and such queries search for an exact path match.</p></div></div>
+<div class="section">
+<h3>Slow Queries and Read Limits<a name="Slow_Queries_and_Read_Limits"></a></h3>
+<p>Slow queries are logged as follows:</p>
+
+<div class="source">
+<pre>*WARN* Traversed 1000 nodes with filter Filter(query=select ...)
+consider creating an index or changing the query
+</pre></div>
+<p>If this is the case, an index might need to be created, or the condition of the
query might need to be changed to take advantage of an existing index.</p>
+<p>If a query reads more than 10 thousand nodes in memory, then the query is cancelled
with an UnsupportedOperationException saying that &#x201c;The query read more than 10000
nodes in memory. To avoid running out of memory, processing was stopped.&#x201d; As a
workaround, this limit can be changed using the system property &#x201c;oak.queryLimitInMemory&#x201d;.</p>
+<p>If a query traversed more than 100 thousand nodes (for example because there is
no index at all and the whole repository is traversed), then the query is cancelled with an
UnsupportedOperationException saying that &#x201c;The query read or traversed more than
10000 nodes. To avoid affecting other tasks, processing was stopped.&#x201d;. As a workaround,
this limit can be changed using the system property &#x201c;oak.queryLimitReads&#x201d;.</p></div>
+<div class="section">
+<h3>Native Queries<a name="Native_Queries"></a></h3>
+<p>To take advantage of features that are available in full-text index implementations
such as Apache Lucene and Apache Lucene Solr, so called <tt>native</tt> constraints
are supported. Such constraints are passed directly to the full-text index. This is supported
for both XPath and SQL-2. For XPath queries, the name of the function is <tt>rep:native</tt>,
and for SQL-2, it is <tt>native</tt>. The first parameter is the index type (currently
supported are <tt>solr</tt> and <tt>lucene</tt>). The second parameter
is the native search query expression. For SQL-2, the selector name (if needed) is the first
parameter, just before the language. Examples:</p>
+
+<div class="source">
+<pre>//*[rep:native('solr', 'name:(Hello OR World)')]
+
+select [jcr:path] from [nt:base] 
+where native('solr', 'name:(Hello OR World)')
+
+select [jcr:path] from [nt:base] as a 
+where native(a, 'solr', 'name:(Hello OR World)')
+</pre></div>
+<p>This also allows to use the Solr <a class="externalLink" href="http://wiki.apache.org/solr/MoreLikeThis">MoreLikeThis</a>
feature. An example query is:</p>
+
+<div class="source">
+<pre>select [jcr:path] from [nt:base] 
+where native('solr', 'mlt?q=id:UTF8TEST&amp;mlt.fl=manu,cat&amp;mlt.mindf=1&amp;mlt.mintf=1')
+</pre></div>
+<p>If no full-text implementation is available, those queries will fail.</p></div>
+<div class="section">
+<h3>XPath to SQL2 Transformation<a name="XPath_to_SQL2_Transformation"></a></h3>
+<p>To support the XPath query language, such queries are internally converted to SQL2.
</p>
+<p>Every conversion is logged in <tt>debug</tt> level under the <tt>org.apache.jackrabbit.oak.query.QueryEngineImpl</tt>
logger:</p>
+
+<div class="source">
+<pre>org.apache.jackrabbit.oak.query.QueryEngineImpl Parsing xpath statement: 
+    //element(*)[@sling:resourceType = 'slingevent:Lock')]
+org.apache.jackrabbit.oak.query.QueryEngineImpl XPath &gt; SQL2: 
+    select [jcr:path], [jcr:score], * from [nt:base] as a 
+    where [sling:resourceType] = 'slingevent:Lock' 
+    /* xpath: //element(*)[@sling:resourceType = 'slingevent:Lock' 
+    and @lock.created &lt; xs:dateTime('2013-09-02T15:44:05.920+02:00')] */
+</pre></div>
+<p><i>Each transformed SQL2 query contains the original XPath query as a comment.</i></p>
+<p>When converting from XPath to SQL-2, <tt>or</tt> conditions are automatically
converted to <tt>union</tt> queries, so that indexes can be used for conditions
of the form <tt>a = 'x' or b = 'y'</tt>.</p></div>
+<div class="section">
+<h3>Query Processing<a name="Query_Processing"></a></h3>
+<p>Internally, the query engine uses a cost based query optimizer that asks all the
available query indexes for the estimated cost to process the query. It then uses the index
with the lowest cost.</p>
+<p>By default, the following indexes are available:</p>
+
+<ul>
+  
+<li>A property index for each indexed property.</li>
+  
+<li>A full-text index which is based on Apache Lucene / Solr.</li>
+  
+<li>A node type index (which is based on an property index for the properties  jcr:primaryType
and jcr:mixins).</li>
+  
+<li>A traversal index that iterates over a subtree.</li>
+</ul>
+<p>If no index can efficiently process the filter condition, the nodes in the repository
are traversed at the given subtree.</p>
+<p>Usually, data is read from the index and repository while traversing over the query
result. There are exceptions however, where all data is read in memory when the query is executed:
when using a full-text index, and when using an &#x201c;order by&#x201d; clause.</p></div>
+<div class="section">
+<h3>The Property Index<a name="The_Property_Index"></a></h3>
+<p>Is useful whenever there is a query with a property constraint that is not full-text:</p>
+
+<div class="source">
+<pre>SELECT * FROM [nt:base] WHERE [jcr:uuid] = $id
+</pre></div>
+<p>To define a property index on a subtree you have to add an index definition node
that:</p>
+
+<ul>
+  
+<li>must be of type <tt>oak:QueryIndexDefinition</tt></li>
+  
+<li>must have the <tt>type</tt> property set to <b><tt>property</tt></b></li>
+  
+<li>contains the <tt>propertyNames</tt> property that indicates what properties
will be stored in the index.  <tt>propertyNames</tt> can be a list of properties,
and it is optional.in case it is missing, the node name will be used as a property name reference
value</li>
+</ul>
+<p><i>Optionally</i> you can specify</p>
+
+<ul>
+  
+<li>a uniqueness constraint on a property index by setting the <tt>unique</tt>
flag to <tt>true</tt></li>
+  
+<li>that the property index only applies to a certain node type by setting the <tt>declaringNodeTypes</tt>
property</li>
+  
+<li>the <tt>reindex</tt> flag which when set to <tt>true</tt>,
triggers a full content re-index.</li>
+</ul>
+<p>Example:</p>
+
+<div class="source">
+<pre>{
+  NodeBuilder index = root.child(&quot;oak:index&quot;);
+  index.child(&quot;uuid&quot;)
+    .setProperty(&quot;jcr:primaryType&quot;, &quot;oak:QueryIndexDefinition&quot;,
Type.NAME)
+    .setProperty(&quot;type&quot;, &quot;property&quot;)
+    .setProperty(&quot;propertyNames&quot;, &quot;jcr:uuid&quot;)
+    .setProperty(&quot;declaringNodeTypes&quot;, &quot;mix:referenceable&quot;)
+    .setProperty(&quot;unique&quot;, true)
+    .setProperty(&quot;reindex&quot;, true);
+}
+</pre></div>
+<p>or to simplify you can use one of the existing <tt>IndexUtils#createIndexDefinition</tt>
helper methods:</p>
+
+<div class="source">
+<pre>{
+  NodeBuilder index = IndexUtils.getOrCreateOakIndex(root);
+  IndexUtils.createIndexDefinition(index, &quot;myProp&quot;, true, false, ImmutableList.of(&quot;myProp&quot;),
null);
+}
+</pre></div></div>
+<div class="section">
+<h3>The Lucene Full-Text Index<a name="The_Lucene_Full-Text_Index"></a></h3>
+<p>The full-text index handles the &#x2018;contains&#x2019; type of queries:</p>
+
+<div class="source">
+<pre>//*[jcr:contains(., 'text')]
+</pre></div>
+<p>If a full-text index is configured, then all queries that have a full-text condition
use the full-text index, no matter if there are other conditions that are indexed, and no
matter if there is a path restriction.</p>
+<p>If no full-text index is configured, then queries with full-text conditions may
not work as expected. (The query engine has a basic verification in place for full-text conditions,
but it does not support all features that Lucene does, and it traverses all nodes if there
are no indexed constraints).</p>
+<p>The full-text index update is asynchronous via a background thread, see <tt>Oak#withAsyncIndexing</tt>.
This means that some full-text searches will not work for a small window of time: the background
thread runs every 5 seconds, plus the time is takes to run the diff and to run the text-extraction
process. </p>
+<p>The async update status is now reflected on the <tt>oak:index</tt> node
with the help of a few properties, see <a class="externalLink" href="https://issues.apache.org/jira/browse/OAK-980">OAK-980</a></p>
+<p>TODO Node aggregation <a class="externalLink" href="https://issues.apache.org/jira/browse/OAK-828">OAK-828</a></p>
+<p>The index definition node for a lucene-based full-text index:</p>
+
+<ul>
+  
+<li>must be of type <tt>oak:QueryIndexDefinition</tt></li>
+  
+<li>must have the <tt>type</tt> property set to <b><tt>lucene</tt></b></li>
+  
+<li>must contain the <tt>async</tt> property set to the value <tt>async</tt>,
this is what sends the index update process to a background thread</li>
+</ul>
+<p><i>Optionally</i> you can add</p>
+
+<ul>
+  
+<li>what subset of property types to be included in the index via the <tt>includePropertyTypes</tt>
property</li>
+  
+<li>a blacklist of property names: what property to be excluded from the index via
the <tt>excludePropertyNames</tt> property</li>
+  
+<li>the <tt>reindex</tt> flag which when set to <tt>true</tt>,
triggers a full content re-index.</li>
+</ul>
+<p>Example:</p>
+
+<div class="source">
+<pre>{
+  NodeBuilder index = root.child(&quot;oak:index&quot;);
+  index.child(&quot;lucene&quot;)
+    .setProperty(&quot;jcr:primaryType&quot;, &quot;oak:QueryIndexDefinition&quot;,
Type.NAME)
+    .setProperty(&quot;type&quot;, &quot;lucene&quot;)
+    .setProperty(&quot;async&quot;, &quot;async&quot;)
+    .setProperty(PropertyStates.createProperty(&quot;includePropertyTypes&quot;,
ImmutableSet.of(
+        PropertyType.TYPENAME_STRING, PropertyType.TYPENAME_BINARY), Type.STRINGS))
+    .setProperty(PropertyStates.createProperty(&quot;excludePropertyNames&quot;,
ImmutableSet.of( 
+        &quot;jcr:createdBy&quot;, &quot;jcr:lastModifiedBy&quot;), Type.STRINGS))
+    .setProperty(&quot;reindex&quot;, true);
+}
+</pre></div></div>
+<div class="section">
+<h3>The Solr Full-Text Index<a name="The_Solr_Full-Text_Index"></a></h3>
+<p><tt>TODO</tt></p></div>
+<div class="section">
+<h3>The Node Type Index<a name="The_Node_Type_Index"></a></h3>
+<p>The <tt>NodeTypeIndex</tt> implements a <tt>QueryIndex</tt>
using <tt>PropertyIndexLookup</tt>s on <tt>jcr:primaryType</tt> <tt>jcr:mixinTypes</tt>
to evaluate a node type restriction on the filter. The cost for this index is the sum of the
costs of the <tt>PropertyIndexLookup</tt> for queries on <tt>jcr:primaryType</tt>
and <tt>jcr:mixinTypes</tt>.</p></div>
+<div class="section">
+<h3>Cost Calculation<a name="Cost_Calculation"></a></h3>
+<p>Each query index is expected to estimate the worst-case cost to query with the given
filter. The returned value is between 1 (very fast; lookup of a unique node) and the estimated
number of entries to traverse, if the cursor would be fully read, and if there could in theory
be one network round-trip or disk read operation per node (this method may return a lower
number if the data is known to be fully in memory).</p>
+<p>The returned value is supposed to be an estimate and doesn&#x2019;t have to
be very accurate. Please note this method is called on each index whenever a query is run,
so the method should be reasonably fast (not read any data itself, or at least not read too
much data).</p>
+<p>If an index implementation can not query the data, it has to return <tt>Double.POSITIVE_INFINITY</tt>.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2012-2014
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+        
+        
+          
+    
+    
+                
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit-oak/widgets/project_thin_badge.js"></script>
+    </div>
+        </div>
+    </footer>
+  </body>
+</html>
\ No newline at end of file

Propchange: jackrabbit/site/live/oak/docs/solr.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/site/live/oak/docs/use_getting_started.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/use_getting_started.html?rev=1599515&r1=1599514&r2=1599515&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/use_getting_started.html (original)
+++ jackrabbit/site/live/oak/docs/use_getting_started.html Tue Jun  3 12:43:05 2014
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2014-06-02
+ | Generated by Apache Maven Doxia at 2014-06-03
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20140602" />
+    <meta name="Date-Revision-yyyymmdd" content="20140603" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak - Runnable jar</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -179,8 +179,8 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2014-06-02</li>
-                  <li class="divider">|</li> <li id="projectVersion">Version:
0.20-SNAPSHOT</li>
+                  <li id="publishDate">Last Published: 2014-06-03</li>
+                  <li class="divider">|</li> <li id="projectVersion">Version:
1.1-SNAPSHOT</li>
                       
                 
                     



Mime
View raw message