You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2019/05/20 11:23:20 UTC

svn commit: r1859550 [11/26] - in /jackrabbit/site/live/archive: ./ wiki/ wiki/JCR/ wiki/JCR/attachments/ wiki/JCR/attachments/115513387/ wiki/JCR/attachments/115513390/ wiki/JCR/attachments/115513408/ wiki/JCR/attachments/115513413/ wiki/JCR/attachmen...

Added: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html?rev=1859550&view=auto
==============================================================================
--- jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html (added)
+++ jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html Mon May 20 11:23:18 2019
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Apache Jackrabbit : HowtoSpi2Dav</title>
+        <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body class="theme-default aui-theme-default">
+        <div id="page">
+            <div id="main" class="aui-page-panel">
+                <div id="main-header">
+                    <div id="breadcrumb-section">
+                        <ol id="breadcrumbs">
+                            <li class="first">
+                                <span><a href="index.html">Apache Jackrabbit</a></span>
+                            </li>
+                                                    <li>
+                                <span><a href="Home_70731.html">Home</a></span>
+                            </li>
+                                                </ol>
+                    </div>
+                    <h1 id="title-heading" class="pagetitle">
+                                                <span id="title-text">
+                            Apache Jackrabbit : HowtoSpi2Dav
+                        </span>
+                    </h1>
+                </div>
+
+                <div id="content" class="view">
+                    <div class="page-metadata">
+                        
+        
+    
+        
+    
+        
+        
+            Created by <span class='author'> ASF Infrabot</span> on May 20, 2019
+                        </div>
+                    <div id="main-content" class="wiki-content group">
+                    <h2 id="HowtoSpi2Dav-Context">Context</h2>
+<p>The image below is a good picture of where spi2dav fits in. It was taken from the jackrabbit-spi link below.</p>
+
+<p><a href="http://jackrabbit.apache.org/jackrabbit-spi.data/jackrabbit-spi-overview.gif" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-spi.data/jackrabbit-spi-overview.gif</a></p>
+
+<p>I could not find much documentation on getting it setup.  <br/>
+Here is what I've found so far:</p>
+<ul>
+	<li><a href="https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/README.txt" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/README.txt</a></li>
+	<li><a href="http://jackrabbit.apache.org/jackrabbit-jcr-server.html" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-jcr-server.html</a></li>
+	<li><a href="http://jackrabbit.apache.org/jackrabbit-spi.html" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-spi.html</a></li>
+	<li><a href="http://jackrabbit.apache.org/jackrabbit-web-application.html" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-web-application.html</a></li>
+	<li><a href="http://jackrabbit.apache.org/JCR_Webdav_Protocol.doc" class="external-link" rel="nofollow">http://jackrabbit.apache.org/JCR_Webdav_Protocol.doc</a>
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>Warning: this is only partially working for me, so there might be errors in the documentation.
+</pre>
+</div></div>
+
+<h2 id="HowtoSpi2Dav-Getjcr-serverrunning">Get jcr-server running</h2>
+
+<h3 id="HowtoSpi2Dav-Instructions">Instructions</h3>
+<p>To use spi2dav you need to have the <a href="http://jackrabbit.apache.org/jackrabbit-jcr-server.html" class="external-link" rel="nofollow">&quot;jcr server component&quot;</a> running.</p>
+<ul>
+	<li>Add the jcr-1.0.jar to your servlet containers global library folder. For example: cp ~/.m2/repository/javax/jcr/jcr/1.0/jcr-1.0.jar lib/ext/</li>
+	<li>Download the jcr-server war</li>
+	<li>create a folder in your servlet container's (tomcat, jetty, ...) webapps folder.  I used jackrabbit.</li>
+	<li>uncompress the war into that folder</li>
+	<li>Based on the README.txt referenced above, the following configuration needs to be changed in the web.xml for the webapp:</li>
+</ul>
+
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>    &lt;init-param&gt;
+      &lt;param-name&gt;missing-auth-mapping&lt;/param-name&gt;
+      &lt;param-value&gt;&lt;/param-value&gt;
+    &lt;/init-param&gt;
+</pre>
+</div></div>
+
+<h3 id="HowtoSpi2Dav-AutomatedScript">Automated Script</h3>
+<p>This is a bash script for installing it into jetty.  If you want to use it for tomcat you should change the <code>lib/ext</code> to <code>common/endorsed</code><br/>
+Here is what it does:</p>
+<ul>
+	<li>download the jcr-1.0.jar from ibiblio maven repo into the lib/ext folder</li>
+	<li>download the latest jackrabbit-webapp war</li>
+	<li>unzip this war into a jackrabbit-1.5 inside of webapps</li>
+	<li>run a xslt file over the web.xml file of the jackrabbit-webapp to set the <code>missing-auth-mapping</code> init-param</li>
+</ul>
+
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre># start in the toplevel jetty folder
+curl http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/jcr/jcr/1.0/jcr-1.0.jar &gt; lib/ext/jcr-1.0.jar
+curl -O  http://people.apache.org/maven-snapshot-repository/org/apache/jackrabbit/jackrabbit-webapp/1.5-SNAPSHOT/jackrabbit-webapp-1.5-SNAPSHOT.war
+mkdir webapps/jackrabbit-1.5
+cd webapps/jackrabbit-1.5
+unzip ../../jackrabbit-webapp-1.5-SNAPSHOT.war
+curl http://wiki.apache.org/jackrabbit-data/attachments/HowtoSpi2Dav/attachments/dav-fixer.xslt | xsltproc - WEB-INF/web.xml &gt; fixed-web.xml
+mv fixed-web.xml WEB-INF/web.xml
+</pre>
+</div></div>
+
+
+<h2 id="HowtoSpi2Dav-Accesstheremoteserverfromaclient">Access the remote server from a client</h2>
+
+<h3 id="HowtoSpi2Dav-getthejarsneeded">get the jars needed</h3>
+<p>The jars do not seem to be available for download in binary form, so they must be built:</p>
+<ul>
+	<li>check out the spi sandbox project from <a href="https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi</a></li>
+	<li>run &quot;mvn install&quot; (you need maven2 installed for that to work)
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h3 id="HowtoSpi2Dav-addthedependenciestoyourmavenpom.xml">add the dependencies to your maven pom.xml</h3>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>    &lt;dependency&gt;
+      &lt;groupId&gt;javax.jcr&lt;/groupId&gt;
+      &lt;artifactId&gt;jcr&lt;/artifactId&gt;
+      &lt;version&gt;1.0&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+    	&lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
+    	&lt;artifactId&gt;jackrabbit-core&lt;/artifactId&gt;
+    	&lt;version&gt;1.5-SNAPSHOT&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
+        &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
+        &lt;version&gt;1.3.0&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
+      &lt;artifactId&gt;jackrabbit-spi-spi2dav&lt;/artifactId&gt;
+      &lt;version&gt;1.5-SNAPSHOT&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
+      &lt;artifactId&gt;jackrabbit-jcr2spi&lt;/artifactId&gt;
+      &lt;version&gt;1.5-SNAPSHOT&lt;/version&gt;
+    &lt;/dependency&gt;    
+</pre>
+</div></div>
+
+<h3 id="HowtoSpi2Dav-writethecodetoaccesstherepository">write the code to access the repository</h3>
+<p>This code was figured out based on </p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre> org.apache.jackrabbit.jcr2spi.JCR2SPIRepositoryStub </pre>
+</div></div>
+<p> located in </p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre> svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client </pre>
+</div></div>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>import javax.jcr.Repository;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+
+import org.apache.jackrabbit.jcr2spi.RepositoryImpl;
+import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
+import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
+import org.apache.jackrabbit.spi.IdFactory;
+import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.PathFactory;
+import org.apache.jackrabbit.spi.QValueFactory;
+import org.apache.jackrabbit.spi.RepositoryService;
+import org.apache.jackrabbit.spi.commons.identifier.IdFactoryImpl;
+import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
+import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
+import org.apache.jackrabbit.spi.commons.value.QValueFactoryImpl;
+import org.apache.jackrabbit.spi2dav.RepositoryServiceImpl;
+
+...
+
+  String url = &quot;http://localhost:8080/jackrabbit/server&quot;;
+
+  final IdFactory idFactory = IdFactoryImpl.getInstance();
+  final NameFactory nFactory = NameFactoryImpl.getInstance();
+  final PathFactory pFactory = PathFactoryImpl.getInstance();
+  final QValueFactory vFactory = QValueFactoryImpl.getInstance();
+  final RepositoryServiceImpl webdavRepoService = 
+     new RepositoryServiceImpl(url, idFactory, nFactory, pFactory, vFactory);
+
+  RepositoryConfig config = new RepositoryConfig() {
+    public RepositoryService getRepositoryService() {
+      return webdavRepoService;
+    }
+
+    public String getDefaultWorkspaceName() {
+      return &quot;default&quot;;
+    }
+
+    public CacheBehaviour getCacheBehaviour() {
+      return CacheBehaviour.INVALIDATE;
+    }
+  };
+
+  Repository repository = RepositoryImpl.create(config);
+  Session session = repository.login(new SimpleCredentials(&quot;user&quot;, &quot;password&quot;.toCharArray()));
+</pre>
+</div></div>
+
+<p>&lt;&lt;AttachInfo&gt;&gt;</p>
+                    </div>
+
+                    
+                                                      
+                </div>             </div> 
+            <div id="footer" role="contentinfo">
+                <section class="footer-body">
+                    <p>Document generated by Confluence on May 20, 2019 11:11</p>
+                    <div id="footer-logo"><a href="http://www.atlassian.com/">Atlassian</a></div>
+                </section>
+            </div>
+        </div>     </body>
+</html>

Propchange: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Dav_115513407.html
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html?rev=1859550&view=auto
==============================================================================
--- jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html (added)
+++ jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html Mon May 20 11:23:18 2019
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Apache Jackrabbit : HowtoSpi2Rmi</title>
+        <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body class="theme-default aui-theme-default">
+        <div id="page">
+            <div id="main" class="aui-page-panel">
+                <div id="main-header">
+                    <div id="breadcrumb-section">
+                        <ol id="breadcrumbs">
+                            <li class="first">
+                                <span><a href="index.html">Apache Jackrabbit</a></span>
+                            </li>
+                                                    <li>
+                                <span><a href="Home_70731.html">Home</a></span>
+                            </li>
+                                                </ol>
+                    </div>
+                    <h1 id="title-heading" class="pagetitle">
+                                                <span id="title-text">
+                            Apache Jackrabbit : HowtoSpi2Rmi
+                        </span>
+                    </h1>
+                </div>
+
+                <div id="content" class="view">
+                    <div class="page-metadata">
+                        
+        
+    
+        
+    
+        
+        
+            Created by <span class='author'> ASF Infrabot</span> on May 20, 2019
+                        </div>
+                    <div id="main-content" class="wiki-content group">
+                    <h2 id="HowtoSpi2Rmi-Context">Context</h2>
+<p>The image below is a good picture of where spi2rmi fits in. It was taken from the jackrabbit-spi link below.</p>
+
+<p><a href="http://jackrabbit.apache.org/jackrabbit-spi.data/jackrabbit-spi-overview.gif" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-spi.data/jackrabbit-spi-overview.gif</a></p>
+
+<p>I could not find much documentation on getting it setup.  <br/>
+Here is what I've found so far:</p>
+<ul>
+	<li><a href="https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi/README.txt" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi/README.txt</a></li>
+	<li><a href="http://jackrabbit.apache.org/jackrabbit-spi.html" class="external-link" rel="nofollow">http://jackrabbit.apache.org/jackrabbit-spi.html</a>
+<br class="atl-forced-newline"/>
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h2 id="HowtoSpi2Rmi-NotesfromAngela">Notes from Angela</h2>
+
+<p>the spi-rmi is currently still in the sandbox, since we didn't spent time on optimization yet.</p>
+
+<p>if you are looking for an example setup, you may start with the 'getRepository()' method defined with <a href="http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPI2JCROverRMIRepositoryStub.java" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/JCR2SPI2JCROverRMIRepositoryStub.java</a></p>
+
+<p>the jcr2spi code can be found at <a href="http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr2spi" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr2spi</a></p>
+
+<p>the rmi-spi code <a href="http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/spi-rmi" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/spi-rmi</a></p>
+
+<p>the spi2jcr code <a href="http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi2jcr" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi2jcr</a></p>
+
+<p>minimal intro as follows:</p>
+
+<ul>
+	<li>jcr2spi-Repository takes a <code>RepositoryConfig</code></li>
+	<li>the most important part of the configuration is the <code>RepositoryService</code></li>
+	<li><code>RepositoryService</code> is the main interface defined by the SPI.
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<p>running the setup you mention, you need to create a <code>RepositoryConfig</code><br/>
+that returns the <code>ClientRepositoryService</code> of spi-rmi which itself was created with a remote <code>RepositoryService</code> wrapping whatever spi implementation.</p>
+
+<h2 id="HowtoSpi2Rmi-KnownIssues">Known Issues</h2>
+<p>You might have to deal with this issue:
+<a href="https://issues.apache.org/jira/browse/JCR-1653" class="external-link" rel="nofollow">https://issues.apache.org/jira/browse/JCR-1653</a></p>
+
+<p>If you use the patch there you have to make sure it is applied to the code running on the server and on the client.</p>
+
+<h2 id="HowtoSpi2Rmi-Setupaspiserver">Setup a spi server</h2>
+
+<h3 id="HowtoSpi2Rmi-UsetheSPIServerclassinjackrabbit-test-client">Use the SPIServer class in jackrabbit-test-client</h3>
+<p>The only code I could find which setups up an SPI server was in the spi-contrib testing project:
+<a href="https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client</a> (even though the folder name is &quot;client&quot; the maven artifactId is jackrabbit-test-client</p>
+
+<p>This project has a class <code>org.apache.jackrabbit.jcr2spi.SPIServer</code> which starts up the SPI RMI Server</p>
+
+<h3 id="HowtoSpi2Rmi-Usepatchonjackrabbit-webapp">Use patch on jackrabbit-webapp</h3>
+
+<p>Another option is to try using this patch: <a href="attachments/115513408/115513409.patch" data-linked-resource-id="115513409" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="jackrabbit-webapp-SPIServer-1.patch" data-nice-type="Text File" data-linked-resource-content-type="text/plain" data-linked-resource-container-id="115513408" data-linked-resource-container-version="1">jackrabbit-webapp-SPIServer-1.patch</a>  It should be applied to the jackrabbit-webapp project.  It adds a <code>SPIServerStartServlet</code>, which adds the<br/>
+<code>ServerRepositoryService</code> to the webapps RMI registry.  It should wrap the existing repository started up by the webapp normally.  You have to add a reference to your WEB-INF/web.xml:</p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>    &lt;servlet&gt;
+        &lt;servlet-name&gt;SPIServerStartup&lt;/servlet-name&gt;
+        &lt;description&gt;
+            Starts up an SPI RMI server.   
+        &lt;/description&gt;
+        &lt;servlet-class&gt;org.apache.jackrabbit.j2ee.SPIServerStartupServlet&lt;/servlet-class&gt;
+        &lt;load-on-startup&gt;6&lt;/load-on-startup&gt;
+    &lt;/servlet&gt;
+</pre>
+</div></div>
+
+<p>It doesn't pay attention to all the config options used by the rest of webapp so you might have to  tweak it.  </p>
+
+<p>I haven't submitted an issue with this patch because jackrabbit-webapp should be not be depending on the jars that SPI Server requires.  One way to get around this is to make another project inside of sandbox/spi that depends  on jackrabbit-webapp and creates this servlet.  Then people can copy it and its deps into the webapp.</p>
+
+<h2 id="HowtoSpi2Rmi-Setupaspirmiclient">Setup a spi rmi client</h2>
+
+<p>This code was duplicated from <code>org.apache.jackrabbit.jcr2spi.JCR2SPIOverRMIRepositoryStub</code> which is located in <a href="https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client" class="external-link" rel="nofollow">https://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client</a> (jackrabbit-test-client) That code uses a <code>AbstractRepositoryConfig</code> instead which is defined in jackrabbit-test-client.  This code fully implements <code>RepositoryConfig</code> so it doesn't need to depend on jackrabbit-test-client.</p>
+
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>Registry registry = LocateRegistry.getRegistry(&quot;localhost&quot;, Registry.REGISTRY_PORT);
+RemoteRepositoryService remoteRepoService =
+  (RemoteRepositoryService) registry.lookup(&quot;jackrabbit.spi-server&quot;);
+			
+final RepositoryService localRepoService = new ClientRepositoryService(remoteRepoService);
+
+Repository repo = RepositoryImpl.create(new RepositoryConfig(){
+  public RepositoryService getRepositoryService() {
+    return localRepoService;
+  }
+
+  public String getDefaultWorkspaceName() {
+    return null;
+  }
+
+  public CacheBehaviour getCacheBehaviour() {
+    return CacheBehaviour.INVALIDATE;
+  }
+            	
+});
+
+</pre>
+</div></div>
+                    </div>
+
+                                        <div class="pageSection group">
+                        <div class="pageSectionHeader">
+                            <h2 id="attachments" class="pageSectionTitle">Attachments:</h2>
+                        </div>
+
+                        <div class="greybox" align="left">
+                                                            <img src="images/icons/bullet_blue.gif" height="8" width="8" alt=""/>
+                                <a href="attachments/115513408/115513409.patch">jackrabbit-webapp-SPIServer-1.patch</a> (text/plain)
+                                <br/>
+                                                    </div>
+                    </div>
+                    
+                                                      
+                </div>             </div> 
+            <div id="footer" role="contentinfo">
+                <section class="footer-body">
+                    <p>Document generated by Confluence on May 20, 2019 11:11</p>
+                    <div id="footer-logo"><a href="http://www.atlassian.com/">Atlassian</a></div>
+                </section>
+            </div>
+        </div>     </body>
+</html>

Propchange: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/site/live/archive/wiki/JCR/HowtoSpi2Rmi_115513408.html
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html?rev=1859550&view=auto
==============================================================================
--- jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html (added)
+++ jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html Mon May 20 11:23:18 2019
@@ -0,0 +1,201 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Apache Jackrabbit : Index Implementations</title>
+        <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body class="theme-default aui-theme-default">
+        <div id="page">
+            <div id="main" class="aui-page-panel">
+                <div id="main-header">
+                    <div id="breadcrumb-section">
+                        <ol id="breadcrumbs">
+                            <li class="first">
+                                <span><a href="index.html">Apache Jackrabbit</a></span>
+                            </li>
+                                                    <li>
+                                <span><a href="Home_70731.html">Home</a></span>
+                            </li>
+                                                </ol>
+                    </div>
+                    <h1 id="title-heading" class="pagetitle">
+                                                <span id="title-text">
+                            Apache Jackrabbit : Index Implementations
+                        </span>
+                    </h1>
+                </div>
+
+                <div id="content" class="view">
+                    <div class="page-metadata">
+                        
+        
+    
+        
+    
+        
+        
+            Created by <span class='author'> ASF Infrabot</span> on May 20, 2019
+                        </div>
+                    <div id="main-content" class="wiki-content group">
+                    <h2 id="IndexImplementations-OakIndexImplementations">Oak Index Implementations</h2>
+<style type='text/css'>/*<![CDATA[*/
+div.rbtoc1558350680751 {padding: 0px;}
+div.rbtoc1558350680751 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1558350680751 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style><div class='toc-macro rbtoc1558350680751'>
+<ul class='toc-indentation'>
+<li><a href='#IndexImplementations-OakIndexImplementations'>Oak Index Implementations</a>
+<ul class='toc-indentation'>
+<li><a href='#IndexImplementations-LuceneIndex'>Lucene Index</a></li>
+<li><a href='#IndexImplementations-PropertyIndex'>Property Index</a></li>
+<li><a href='#IndexImplementations-PropertyIndexwithChildNodes'>Property Index with Child Nodes</a></li>
+<li><a href='#IndexImplementations-&#39;Old&#39;B-TreeIndex'>&#39;Old&#39; B-Tree Index</a></li>
+<li><a href='#IndexImplementations-Index'>MongoDb Index</a></li>
+<li><a href='#IndexImplementations-Solr'>Solr</a></li>
+</ul>
+</li>
+<li><a href='#IndexImplementations-VirtualIndexImplementations'>Virtual Index Implementations</a>
+<ul class='toc-indentation'>
+<li><a href='#IndexImplementations-NodeTypeIndex'>Node Type Index</a></li>
+<li><a href='#IndexImplementations-TraversingIndex'>Traversing Index</a></li>
+</ul>
+</li>
+<li><a href='#IndexImplementations-TestCases'>Test Cases</a>
+<ul class='toc-indentation'>
+<li><a href='#IndexImplementations-ConcurrentContentCreation'>Concurrent Content Creation</a></li>
+</ul>
+</li>
+<li><a href='#IndexImplementations-Related'>Related</a>
+<ul class='toc-indentation'>
+<li><a href='#IndexImplementations-UUIDIndex'>UUID Index</a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h3 id="IndexImplementations-LuceneIndex">Lucene Index</h3>
+
+<ul>
+	<li>State: works</li>
+	<li>Was originally planned to be mainly a fulltext index, but might be used to index properties as well</li>
+	<li>Theoretical limitations:
+	<ul>
+		<li>Not clear how it works in a clustered environment</li>
+		<li>Updates might need to be synchronized (no concurrent updates)
+<br class="atl-forced-newline"/></li>
+	</ul>
+	</li>
+</ul>
+
+
+<h3 id="IndexImplementations-PropertyIndex">Property Index</h3>
+
+<ul>
+	<li>State: works</li>
+	<li>Theoretical limitations:
+	<ul>
+		<li>All index data is stored in one node, and oak-core keeps as well as all current <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=MicroKernel&amp;linkCreation=true&amp;fromPageId=115513410">MicroKernel</a> implementations nodes fully in memory, so indexes have to fix in memory</li>
+		<li>Concurrent updates might be a problem (maybe not)
+<br class="atl-forced-newline"/></li>
+	</ul>
+	</li>
+</ul>
+
+
+<h3 id="IndexImplementations-PropertyIndexwithChildNodes">Property Index with Child Nodes</h3>
+
+<ul>
+	<li>State: doesn't exist yet</li>
+	<li>Uses a flat hierarchy (child nodes instead of properties)</li>
+	<li>Should solve the 'single node' problem of the Property Index
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h3 id="IndexImplementations-&#39;Old&#39;B-TreeIndex">'Old' B-Tree Index</h3>
+
+<ul>
+	<li>State: works</li>
+	<li>Is a <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=MicroKernel&amp;linkCreation=true&amp;fromPageId=115513410">MicroKernel</a> wrapper, doesn't understand oak property types</li>
+	<li>Theoretical limitations:
+	<ul>
+		<li>Concurrent updates might be a problem (maybe not)
+<br class="atl-forced-newline"/></li>
+	</ul>
+	</li>
+</ul>
+
+
+<h3 id="IndexImplementations-Index"><a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=MongoDb&amp;linkCreation=true&amp;fromPageId=115513410">MongoDb</a> Index</h3>
+
+<ul>
+	<li>State: doesn't exist yet</li>
+	<li>Theoretical limitations:
+	<ul>
+		<li><a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=MongoDb&amp;linkCreation=true&amp;fromPageId=115513410">MongoDb</a> indexes can not be sharded
+<br class="atl-forced-newline"/></li>
+	</ul>
+	</li>
+</ul>
+
+
+<h3 id="IndexImplementations-Solr">Solr</h3>
+
+<ul>
+	<li>State: prototype</li>
+	<li><p>Source code is on: [https://github.com/tteofili/jackrabbit-oak/tree/trunk/oak-solr]
+<br class="atl-forced-newline" /></p></li>
+</ul>
+
+
+<h2 id="IndexImplementations-VirtualIndexImplementations">Virtual Index Implementations</h2>
+
+<h3 id="IndexImplementations-NodeTypeIndex">Node Type Index</h3>
+
+<ul>
+	<li>State: works</li>
+	<li>Internally uses a Property Index (see above), but could use any other index implementation
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h3 id="IndexImplementations-TraversingIndex">Traversing Index</h3>
+
+<ul>
+	<li>Status: works</li>
+	<li>Traverses the repository below a given node
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h2 id="IndexImplementations-TestCases">Test Cases</h2>
+
+<h3 id="IndexImplementations-ConcurrentContentCreation">Concurrent Content Creation</h3>
+
+<ul>
+	<li>See OAK-442
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<h2 id="IndexImplementations-Related">Related</h2>
+
+<h3 id="IndexImplementations-UUIDIndex">UUID Index</h3>
+
+<p>Currently, only save (committed) data is indexed. Therefore, queries of the form &quot;jcr:uuid = ?&quot; will only return saved nodes, and transient nodes are not returned.</p>
+                    </div>
+
+                    
+                                                      
+                </div>             </div> 
+            <div id="footer" role="contentinfo">
+                <section class="footer-body">
+                    <p>Document generated by Confluence on May 20, 2019 11:11</p>
+                    <div id="footer-logo"><a href="http://www.atlassian.com/">Atlassian</a></div>
+                </section>
+            </div>
+        </div>     </body>
+</html>

Propchange: jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/site/live/archive/wiki/JCR/Index-Implementations_115513410.html
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html?rev=1859550&view=auto
==============================================================================
--- jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html (added)
+++ jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html Mon May 20 11:23:18 2019
@@ -0,0 +1,375 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Apache Jackrabbit : IndexingConfiguration</title>
+        <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body class="theme-default aui-theme-default">
+        <div id="page">
+            <div id="main" class="aui-page-panel">
+                <div id="main-header">
+                    <div id="breadcrumb-section">
+                        <ol id="breadcrumbs">
+                            <li class="first">
+                                <span><a href="index.html">Apache Jackrabbit</a></span>
+                            </li>
+                                                    <li>
+                                <span><a href="Home_70731.html">Home</a></span>
+                            </li>
+                                                </ol>
+                    </div>
+                    <h1 id="title-heading" class="pagetitle">
+                                                <span id="title-text">
+                            Apache Jackrabbit : IndexingConfiguration
+                        </span>
+                    </h1>
+                </div>
+
+                <div id="content" class="view">
+                    <div class="page-metadata">
+                        
+        
+    
+        
+    
+        
+        
+            Created by <span class='author'> ASF Infrabot</span> on May 20, 2019
+                        </div>
+                    <div id="main-content" class="wiki-content group">
+                    <p>Starting with version 1.4, the default search index implementation in Jackrabbit allows you to control which properties of a node are indexed and how much they will affect the jcr:score value of that node in the result.</p>
+
+<p>The configuration parameter is called <code>indexingConfiguration</code> and per default is not set. This means all properties of a node are indexed.</p>
+
+<p>If you wish to configure the indexing behaviour you need to add a parameter to the <a href="SearchIndex_115513505.html">SearchIndex</a> element in your workspace.xml and repository.xml file. The following example uses a configuration file, which is located in the same folder like the workspace.xml file:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;param name=&quot;indexingConfiguration&quot; value=&quot;${wsp.home}/indexing_configuration.xml&quot;/&gt;
+</pre>
+</div></div>
+
+<h3 id="IndexingConfiguration-Indexrules">Index rules</h3>
+
+<p>To optimize the index size you can index only certain properties of a node type.</p>
+
+<p>With the below configuration only properties named Text are indexed for nodes of type nt:unstructured. This also applies to nodes with a type that extends from nt:unstructured.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>Please note that you have to declare the namespace prefixes in the configuration element that you are using throughout the XML file!</p>
+
+<p>It is also possible to configure a boost value for the nodes that match the index rule. The default boost value is 1.0. Higher boost values (a reasonable range is 1.0 - 5.0) will yield a higher score value and appear as more relevant.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;2.0&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>If you do not whish to boost the complete node but only certain properties you can also provide a boost value for the listed properties:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property boost=&quot;3.0&quot;&gt;Title&lt;/property&gt;
+    &lt;property boost=&quot;1.5&quot;&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+
+<p>You may also add a condition to the index rule and have multiple rules with the same nodeType. The first index rule that matches will apply and all remaining ones are ignored:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;2.0&quot;
+              condition=&quot;@priority = &#39;high&#39;&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>In the above example the first index rule only applies if the nt:unstructured node has a priority property with a value 'high'. The condition only supports the equals operator and a string literal.</p>
+
+<p>You may also reference properties in the condition that are not on the current node:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;2.0&quot;
+              condition=&quot;ancestor::*/@priority = &#39;high&#39;&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;0.5&quot;
+              condition=&quot;parent::foo/@priority = &#39;low&#39;&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;1.5&quot;
+              condition=&quot;bar/@priority = &#39;medium&#39;&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>The indexing configuration also allows you to specify the type of a node in the condition. Please note however that the type match must be exact. It does not consider sub types of the specified node type.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;
+              boost=&quot;2.0&quot;
+              condition=&quot;element(*, nt:unstructured)/@priority = &#39;high&#39;&quot;&gt;
+    &lt;property&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>Per default the configured properties are fulltext indexed if they are of type STRING and included in the node scope index. That is, you can do a <code>jcr:contains(., 'foo')</code> and it will return nodes that have a string property that contains the word foo. This behaviour can be disabled:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property nodeScopeIndex=&quot;false&quot;&gt;Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>Starting with Jackrabbit version 1.5 you may also use a regular expression for the local name of a property. A regular expression for the namespace prefix is not supported in versions 1.5 and 1.6! Please make sure you use the correct DTD (the 1.1 version):</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.1.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property isRegexp=&quot;true&quot;&gt;.*Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>As of Jackrabbit 2.0 you can also use the match all regexp for the namespace prefix part of a property name. However that's currently the only supported regular expression. The following configuration will include all properties that end with 'Text' in the node scope fulltext index, all others are also indexed, but not used in the node scope index. Please notice the colon in the regular expression, with the .* expression for the namespace prefix. This matches all namespaces, even the empty namespace. That is, properties without a prefix. In contrast a simple .* expression  only matches property names without prefix, but none with a prefix.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.1.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property isRegexp=&quot;true&quot;&gt;.*Text&lt;/property&gt;
+    &lt;property isRegexp=&quot;true&quot; nodeScopeIndex=&quot;false&quot;&gt;.*:.*&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>Another new feature in Jackrabbit version 1.5 is a new attribute that controls whether the value of a property should be used to create an excerpt. The value of the property is still full-text indexed when set to false, but it will never show up in an excerpt for its parent node.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.1.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;index-rule nodeType=&quot;nt:unstructured&quot;&gt;
+    &lt;property useInExcerpt=&quot;false&quot;&gt;LastModifiedBy&lt;/property&gt;
+    &lt;property isRegexp=&quot;true&quot;&gt;.*Text&lt;/property&gt;
+  &lt;/index-rule&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>For backward compatibility reasons default value for the new property <code>useInExcerpt</code> is <code>true</code>.</p>
+
+<h3 id="IndexingConfiguration-IndexAggregates">Index Aggregates</h3>
+
+<p>Sometimes it is useful to include the contents of descendant nodes into a single node to easier search on content that is scattered across multiple nodes.</p>
+
+<p>Jackrabbit allows you to define index aggregates based on relative path patterns and primary node types.</p>
+
+<p>Changes to aggregated items cause the main item to be reindexed, even if it was not modified. The indexer observes the workspace for any relevant changes, and reindexes affected items automatically.</p>
+
+<p>The following example creates an index aggregate on nt:file that includes the content of the jcr:content node:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;
+               xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;aggregate primaryType=&quot;nt:file&quot;&gt;
+    &lt;include&gt;jcr:content&lt;/include&gt;
+  &lt;/aggregate&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>You can also restrict the included nodes to a certain type:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;
+               xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;aggregate primaryType=&quot;nt:file&quot;&gt;
+    &lt;include primaryType=&quot;nt:resource&quot;&gt;jcr:content&lt;/include&gt;
+  &lt;/aggregate&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>You may also use the * to match all child nodes:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;
+               xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;aggregate primaryType=&quot;nt:file&quot;&gt;
+    &lt;include primaryType=&quot;nt:resource&quot;&gt;*&lt;/include&gt;
+  &lt;/aggregate&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>If you wish to include nodes up to a certain depth below the current node you can add multiple include elements. E.g. the nt:file node may contain an exploded XML document under jcr:content:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;
+               xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;aggregate primaryType=&quot;nt:file&quot;&gt;
+    &lt;include&gt;*&lt;/include&gt;
+    &lt;include&gt;*/*&lt;/include&gt;
+    &lt;include&gt;*/*/*&lt;/include&gt;
+  &lt;/aggregate&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>As of Jackrabbit 1.6 you can define includes on a property level. Properties that match the path against the root of an indexing aggregate are included in the aggregated node index. Aggregated properties are also used to speed up sorting of query results when the order by clause references a property with a relative path. Please make sure you use the correct DTD (the 1.2 version):</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.2.dtd&quot;&gt;
+&lt;configuration xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;
+               xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;aggregate primaryType=&quot;nt:file&quot;&gt;
+    &lt;include&gt;jcr:content&lt;/include&gt;
+    &lt;include-property&gt;jcr:content/jcr:lastModified&lt;/include-property&gt;
+  &lt;/aggregate&gt;
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+
+<p><p>As of Jackrabbit 2.3.2, <a href="https://issues.apache.org/jira/browse/JCR-2989" class="external-link" rel="nofollow">JCR-2989</a> allows for recursive aggregates. This allows for a pretty powerful definition of hierarchy of aggregates, but it also can very easily get out of hand [0].</p></p>
+
+<p>This feature can be enabled by setting the <strong>recursive</strong> flag to <em>true</em>.</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;aggregate primaryType=&quot;nt:folder&quot; recursive=&quot;true&quot; recursiveLimit=&quot;10&quot;&gt;
+</pre>
+</div></div>
+
+<p>The <strong>recursiveLimit</strong> setting controls the number of levels up the indexing should include for same node types. The default value is <em>100</em>, and setting it to <em>0</em> will give you support for full inclusion without any upper bound.</p>
+
+<p><p><code>[0] see</code> <a href="https://issues.apache.org/jira/browse/JCR-2989?focusedCommentId=13051101&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13051101" class="external-link" rel="nofollow">this comment</a> <code>for an example of a scenario where indexing aggregates can hurt performance</code></p></p>
+
+
+<h3 id="IndexingConfiguration-IndexAnalyzers">Index Analyzers</h3>
+
+<p>With this configuration part, you define how a property should be analysed. If a property has an analyzer configured, this analyzer is used for indexing and searching this property. For example:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;!DOCTYPE configuration SYSTEM &quot;http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd&quot;&gt;
+&lt;configuration xmlns:nt=&quot;http://www.jcp.org/jcr/nt/1.0&quot;&gt;
+  &lt;analyzers&gt; 
+        &lt;analyzer class=&quot;org.apache.lucene.analysis.KeywordAnalyzer&quot;&gt;
+            &lt;property&gt;mytext&lt;/property&gt;
+        &lt;/analyzer&gt;
+        &lt;analyzer class=&quot;org.apache.lucene.analysis.WhitespaceAnalyzer&quot;&gt;
+            &lt;property&gt;mytext2&lt;/property&gt;
+        &lt;/analyzer&gt;
+  &lt;/analyzers&gt; 
+&lt;/configuration&gt;
+</pre>
+</div></div>
+
+<p>The configuration above means that the property &quot;mytext&quot; for the entire workspace is indexed (and searched) with the lucene keywordAnalyzer, and property &quot;mytext2&quot; with whitespaceAnalyzer. Using different analyzers for different languages is specifically useful.</p>
+
+<p>Though, when using analyzers, you may find unexpected behavior when searching within a property compared to searching within a node scope: <br/>
+When your query is for example:</p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>xpath = &quot;//*[jcr:contains(mytext,&#39;analyzer&#39;)]&quot;
+</pre>
+</div></div>
+
+<p>and the property &quot;mytext&quot; contained the text : &quot;testing my analyzers&quot;. </p>
+
+<p><p>Now, when not having configured any analyzers for the property "mytext" (and not changed the default analyzer in <a href="/confluence/display/JCR/SearchIndex" title="SearchIndex">SearchIndex</a>), this xpath does not return a hit in the node with the property above. Also xpath = "//&#42;[jcr:contains(.,'analyzer')]", won't give a hit. Realize, that you can only set specific analyzers on a node property, and that the node scope indexing/analyzing always is done with the globally defined analyzer in <a href="/confluence/display/JCR/SearchIndex" title="SearchIndex">SearchIndex</a> element. Now, when I would change the analyzer used to index the "mytext" property above to </p></p>
+
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>&lt;analyzer class=&quot;org.apache.lucene.analysis.Analyzer.GermanAnalyzer&quot;&gt;
+     &lt;property&gt;mytext&lt;/property&gt;
+&lt;/analyzer&gt;
+</pre>
+</div></div>
+
+<p><p>and I would do the same search again, then for <code>xpath = "//&#42;[jcr:contains(mytext,'analyzer')]"</code> I would find a hit because of stemming! The other search, <code>xpath = "//&#42;[jcr:contains(.,'analyzer')]"</code> still would not give a result, since the node scope is indexed with the global analyzer, which in this case did not do stemming. </p></p>
+
+<p>So, realize that when using analyzers for specific properties, you might find a hit in a property for some search text, and you do not find a hit with the same search text in the node scope of the property!</p>
+
+
+<p><strong>Important note</strong>: Both index rules and index aggregates influence how content is indexed in Jackrabbit. If you change the configuration the existing content is not automatically re-indexed according to the new rules. You therefore have to manually re-index the content when you change the configuration!</p>
+                    </div>
+
+                    
+                                                      
+                </div>             </div> 
+            <div id="footer" role="contentinfo">
+                <section class="footer-body">
+                    <p>Document generated by Confluence on May 20, 2019 11:11</p>
+                    <div id="footer-logo"><a href="http://www.atlassian.com/">Atlassian</a></div>
+                </section>
+            </div>
+        </div>     </body>
+</html>

Propchange: jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/site/live/archive/wiki/JCR/IndexingConfiguration_115513411.html
------------------------------------------------------------------------------
    svn:executable = *

Added: jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html?rev=1859550&view=auto
==============================================================================
--- jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html (added)
+++ jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html Mon May 20 11:23:18 2019
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Apache Jackrabbit : InteractiveCommandLine</title>
+        <link rel="stylesheet" href="styles/site.css" type="text/css" />
+        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+
+    <body class="theme-default aui-theme-default">
+        <div id="page">
+            <div id="main" class="aui-page-panel">
+                <div id="main-header">
+                    <div id="breadcrumb-section">
+                        <ol id="breadcrumbs">
+                            <li class="first">
+                                <span><a href="index.html">Apache Jackrabbit</a></span>
+                            </li>
+                                                    <li>
+                                <span><a href="Home_70731.html">Home</a></span>
+                            </li>
+                                                </ol>
+                    </div>
+                    <h1 id="title-heading" class="pagetitle">
+                                                <span id="title-text">
+                            Apache Jackrabbit : InteractiveCommandLine
+                        </span>
+                    </h1>
+                </div>
+
+                <div id="content" class="view">
+                    <div class="page-metadata">
+                        
+        
+    
+        
+    
+        
+        
+            Created by <span class='author'> ASF Infrabot</span> on May 20, 2019
+                        </div>
+                    <div id="main-content" class="wiki-content group">
+                    <p>This document describes how to </p>
+<ul>
+	<li>Execute a command line app in an interactive mode to change a <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=JackRabbit&amp;linkCreation=true&amp;fromPageId=115513412">JackRabbit</a> Repository.</li>
+	<li>Execute specific commands on interactive mode. For example, how to create a new workspace.
+<br class="atl-forced-newline"/></li>
+</ul>
+
+
+<p>Feel free to make changes to this document. </p>
+
+<h3 id="InteractiveCommandLine-Accesstherepositoryfromthecommandlineinterface">Access the repository from the command line interface</h3>
+
+<p>Since version 2.1, jcr-commands (contrib) has been integrated to <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=JackRabbit&amp;linkCreation=true&amp;fromPageId=115513412">JackRabbit</a> Standalone (<a href="https://issues.apache.org/jira/browse/JCR-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" class="external-link" rel="nofollow">https://issues.apache.org/jira/browse/JCR-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a>).</p>
+
+<p>So, Jackrabbit standalone may be used to run in an interactive mode and allow the admin to change the repository.</p>
+
+<p>This feature is most valuable to allow the admin to create new workspaces, add specific nodes and others easily.</p>
+
+<p>To execute Jackrabbit standalone in interactive mode, it may be executed specifying parameter -i or --cli.</p>
+
+<p>For example:</p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>java -Xmx256m -jar jackrabbit-standalone-2.2.4.jar --cli file:///scratch/jcr/repository
+</pre>
+</div></div>
+
+<p>Notice that the parameter --cli accepts a valid URI to access the repository. It invokes <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=JcrUtils&amp;linkCreation=true&amp;fromPageId=115513412">JcrUtils</a>.getRepository(URI) from jackrabbit-commons to get the access to the repository.  See the documentation of this method in jackrabbit-commons for more detail. </p>
+
+<p>See the documentation of the repository implementation you want to use for whether it supports this repository URI convention and for what the repository URI should look like. For example, Jackrabbit 2.0 supports the following types of repository URIs:</p>
+
+<p>http(s)://...<br/>
+    A remote repository connection using SPI2DAVex with the given URL. See the jackrabbit-jcr2dav component for more details.  file://...<br/>
+    An embedded Jackrabbit repository located in the given directory. See the jackrabbit-core component for more details.  jndi:...<br/>
+    JNDI lookup for the named repository. See the <a class="createlink" href="/confluence/pages/createpage.action?spaceKey=JCR&amp;title=JndiRepositoryFactory&amp;linkCreation=true&amp;fromPageId=115513412">JndiRepositoryFactory</a> class for more details. </p>
+
+<p>The next examples are valid:</p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>java -Xmx256m -jar jackrabbit-standalone-2.2.4.jar --cli jndi:jcr/Repository
+</pre>
+</div></div>
+
+<p>After executing standalone with --cli parameter, you may execute jcr commands in an interactive mode. Execute </p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>  ``help&#39;&#39;
+</pre>
+</div></div> 
+<p>to list the available commands and </p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>  help [command]
+</pre>
+</div></div>
+<p> for details in a specific command.</p>
+
+<p>For example, you may execute the following commands:</p>
+
+<p>Login using the user and password in the repository:</p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>login user password
+</pre>
+</div></div>
+
+<p>create an additional ``workspace1'' workspace:</p>
+<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>createWorkspace workspace1
+</pre>
+</div></div>
+                    </div>
+
+                    
+                                                      
+                </div>             </div> 
+            <div id="footer" role="contentinfo">
+                <section class="footer-body">
+                    <p>Document generated by Confluence on May 20, 2019 11:11</p>
+                    <div id="footer-logo"><a href="http://www.atlassian.com/">Atlassian</a></div>
+                </section>
+            </div>
+        </div>     </body>
+</html>

Propchange: jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/site/live/archive/wiki/JCR/InteractiveCommandLine_115513412.html
------------------------------------------------------------------------------
    svn:executable = *