Question

is there any way to add new index to a jacrkabbit repository without having a whole repository reindexed?

IE i've configuration file with indexes that looks like this

<?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:ns="http://unicorn.eu/ns" xmlns:jcr="http://www.jcp.org/jcr/1.0">
  <index-rule nodeType="ns:DMSDocument">
    <property>ns:name</property>
  </index-rule>

if i change it to this

<?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:ns="http://unicorn.eu/ns" xmlns:jcr="http://www.jcp.org/jcr/1.0">
  <index-rule nodeType="ns:DMSDocument">
    <property>ns:name</property>
    <property>ns:fullpath</property>
  </index-rule>
</configuration>

is there any way for the new index to take effect without having to reindex whole repository?

Was it helpful?

Solution

You could:

  • Change the index configuration
  • Restart or reopen the repository (so the configuration changes are read)
  • Traverse over all relevant nodes, and 'touch' them (modify a property, for example the last modified time or so). That way the nodes are re-indexed
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top