jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1636805 - /jackrabbit/site/live/oak/docs/query/lucene.html
Date Wed, 05 Nov 2014 07:10:13 GMT
Author: chetanm
Date: Wed Nov  5 07:10:12 2014
New Revision: 1636805

URL: http://svn.apache.org/r1636805
OAK-936: Site checkin for project Oak Documentation-1.1-SNAPSHOT


Modified: jackrabbit/site/live/oak/docs/query/lucene.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/oak/docs/query/lucene.html?rev=1636805&r1=1636804&r2=1636805&view=diff
--- jackrabbit/site/live/oak/docs/query/lucene.html (original)
+++ jackrabbit/site/live/oak/docs/query/lucene.html Wed Nov  5 07:10:12 2014
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
- | Generated by Apache Maven Doxia at 2014-11-04
+ | Generated by Apache Maven Doxia at 2014-11-05
  | Rendered using Apache Maven Fluido Skin 1.3.0
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20141104" />
+    <meta name="Date-Revision-yyyymmdd" content="20141105" />
     <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" />
@@ -185,7 +185,7 @@
         <ul class="breadcrumb">
-                  <li id="publishDate">Last Published: 2014-11-04</li>
+                  <li id="publishDate">Last Published: 2014-11-05</li>
                   <li class="divider">|</li> <li id="projectVersion">Version:
@@ -486,7 +486,7 @@
 <p>Oak uses Lucene for creating index to support queries which involve property constraint
that is not full-text</p>
 <div class="source">
-<pre>select * from [nt:base] where [jcr:uuid] = $id
+<pre>select * from [nt:base] where [alias] = '/admin'
 <p>To define a property index on a subtree for above query you have to add an index
definition </p>
@@ -496,7 +496,7 @@
         &quot;type&quot;: &quot;lucene&quot;,
         &quot;async&quot;: &quot;async&quot;,
         &quot;fulltextEnabled&quot;: false,
-        &quot;includePropertyNames&quot;: [&quot;jcr:uuid&quot;]
+        &quot;includePropertyNames&quot;: [&quot;alias&quot;]
 <p>The index definition node for a lucene-based full-text index:</p>
@@ -698,15 +698,58 @@ order by
 <div class="section">
 <h3>Lucene Index MBeans<a name="Lucene_Index_MBeans"></a></h3>
 <p>Oak Lucene registers a JMX bean <tt>LuceneIndex</tt> which provide details
about the index content e.g. size of index, number of documents present in index etc</p>
-<p><img src="lucene-index-mbean.png" alt="Lucene Index MBean" /></p></div>
+<p><img src="lucene-index-mbean.png" alt="Lucene Index MBean" /></p>
+<p><a name="luke"></a></p></div>
 <div class="section">
-<h3>Index performance<a name="Index_performance"></a></h3>
-<p>Following are some best practices to get good performance from Lucene based indexes</p>
+<h3>Analyzing created Lucene Index<a name="Analyzing_created_Lucene_Index"></a></h3>
+<p><a class="externalLink" href="https://code.google.com/p/luke/">Luke</a>
is a handy development and diagnostic tool, which accesses already existing Lucene indexes
and allows you to display index details. In Oak Lucene index files are stored in <tt>NodeStore</tt>
and hence not directly accessible. To enable analyzing the index files via Luke follow below
mentioned steps</p>
 <ol style="list-style-type: decimal">
-<p>Make use of <a href="#copy-on-read">CopyOnRead</a> so as to enable local
copying of  Lucene index. This would enable use of memory mapped io on supported  platforms
and hence better performance/</p></li>
+<p>Download the Luke version which includes the matching Lucene jars used by  Oak.
As of Oak 1.0.8 release the Lucene version used is 4.7.1. So download the jar from <a class="externalLink"
+<div class="source">
+<pre>$wget https://github.com/DmitryKey/luke/releases/download/4.7.0/luke-with-deps.jar
+<p>Use the <a class="externalLink" href="https://github.com/apache/jackrabbit-oak/tree/trunk/oak-run#console">Oak
Console</a> to dump the Lucene index from <tt>NodeStore</tt>  to filesystem
directory. Use the <tt>lc dump</tt> command</p>
+<div class="source">
+<pre>$ java -jar oak-run-*.jar console /path/to/oak/repository
+Apache Jackrabbit Oak 1.1-SNAPSHOT
+Jackrabbit Oak Shell (Apache Jackrabbit Oak 1.1-SNAPSHOT, JVM: 1.7.0_55)
+Type ':help' or ':h' for help.
+/&gt; lc info /oak:index/lucene
+Index size : 74.1 MB
+Number of documents : 235708
+Number of deleted documents : 231
+/&gt; lc 
+dump   info   
+/&gt; lc dump /path/to/dump/index/lucene /oak:index/lucene
+Copying Lucene indexes to [/path/to/dump/index/lucene]
+Copied 74.1 MB in 1.209 s
+/&gt; lc dump /path/to/dump/index/slingAlias /oak:index/slingAlias
+Copying Lucene indexes to [/path/to/dump/index/lucene-index/slingAlias]
+Copied 8.5 MB in 218.7 ms
+<p>Post dump open the index via luke</p>
+<div class="source">
+<pre>$java -XX:MaxPermSize=512m -jar luke-with-deps.jar
+<p>From the Luke UI shown you can access various details.</p></div>
+<div class="section">
+<h3>Index performance<a name="Index_performance"></a></h3>
+<p>Following are some best practices to get good performance from Lucene based indexes</p>
+<ol style="list-style-type: decimal">
 <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>

View raw message