jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1655079 - /jackrabbit/site/live/oak/docs/query/lucene.html
Date Tue, 27 Jan 2015 16:24:24 GMT
Author: chetanm
Date: Tue Jan 27 16:24:24 2015
New Revision: 1655079

URL: http://svn.apache.org/r1655079
Log:
OAK-301 : Document Oak

Modified:
    jackrabbit/site/live/oak/docs/query/lucene.html

Modified: jackrabbit/site/live/oak/docs/query/lucene.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/lucene.html?rev=1655079&r1=1655078&r2=1655079&view=diff
==============================================================================
--- jackrabbit/site/live/oak/docs/query/lucene.html (original)
+++ jackrabbit/site/live/oak/docs/query/lucene.html Tue Jan 27 16:24:24 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-01-26
+ | Generated by Apache Maven Doxia at 2015-01-27
  | 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="20150126" />
+    <meta name="Date-Revision-yyyymmdd" content="20150127" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Jackrabbit Oak - Lucene Index</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -192,7 +192,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2015-01-26</li>
+                  <li id="publishDate">Last Published: 2015-01-27</li>
                   <li class="divider">|</li> <li id="projectVersion">Version:
1.1-SNAPSHOT</li>
                       
                 
@@ -507,7 +507,7 @@
   - blobSize (long) = 32768
   - evaluatePathRestrictions (boolean) = false
   - name (string)
-  - compatMode (long) = 2
+  - compatVersion (long) = 2
   + indexRules (nt:unstructured)
   + aggregates (nt:unstructured)
   + analyzers (nt:unstructured)
@@ -971,10 +971,28 @@ Copied 8.5 MB in 218.7 ms
 <ol style="list-style-type: decimal">
   
 <li>
-<p>Make use on <a href="#non-root-index">non root indexes</a>. If you query
always  perform search under certain paths then create index definition under those  paths
only. This might be helpful in multi tenant deployment where each tenant  data is stored under
specific repository path and all queries are made under  those path.</p></li>
+<p><b><a href="#non-root-index">Non root indexes</a></b> -
If your query always perform search under certain paths then create index definition under
those paths only. This might be helpful in multi tenant deployment where each tenant data
is stored under specific repository path and all queries are made under those path.</p></li>
   
 <li>
-<p>Index only required data. Depending on your requirement you can create  multiple
Lucene indexes. For example if in majority of cases you are  querying on various properties
specified under <tt>&lt;node&gt;/jcr:content/metadata</tt>  where node
belong to certain specific nodeType then create single index  definition listing all such
properties and restrict it that nodeType. You  can the size of index via mbean</p></li>
+<p><b>NodeType based indexing</b> - Depending on your requirement you can
create multiple Lucene indexes. For example if in majority of cases you are querying on various
properties specified under <tt>&lt;node&gt;/jcr:content/metadata</tt>
where node belong to certain specific nodeType then create single index definition listing
all such properties and restrict it that nodeType.</p>
+<p>In fact its recommended to use single index if all the properties being indexed
are related. This would enable Lucene index to evaluate as much property restriction as possible
natively (which is faster) and also save on storage cost incurred in storing the node path.</p></li>
+  
+<li>
+<p>Use features when required - There are certain features provided by Lucene index
which incur extra cost in terms of storage space when enabled. For example enabling <tt>evaluatePathRestrictions</tt>,
<tt>ordering</tt> etc. Enable such option only when you make use of those features
and further enable them for only those properties. So <tt>ordering</tt> should
be enabled only when sorting is being performed for those properties and <tt>evaluatePathRestrictions</tt>
should only be enabled if you are going to specify path restrictions.</p></li>
+</ol></div>
+<div class="section">
+<h3>Lucene Index vs Property Index<a name="Lucene_Index_vs_Property_Index"></a></h3>
+<p>Lucene based index can be restricted to index only specific properties and in that
case it is similar to <a href="query.html#property-index">Property Index</a>.
However it differs from property index in following aspects</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>Lucene index is Asynchronous - Lucene indexing is done asynchronously with a default
 interval of 5 secs. If there are lots of writes and those writes are related to what  is
being indexed then it might cause further delay. Compared to this the property index  are
always synchronous and upto date.</li>
+</ol>
+<p>So if in your usecase you need the latest result then prefer <i>Property Indexes</i>
over  <i>Lucene Index</i></p>
+
+<ol style="list-style-type: decimal">
+  
+<li>Lucene index cannot enforce uniqueness constraint - By virtue of it being asynchronous
 it cannot enforce uniqueness constraint.</li>
 </ol></div></div>
                   </div>
             </div>



Mime
View raw message