0

有没有办法在不重新索引整个存储库的情况下向 jacrkabbit 存储库添加新索引?

IE 我的配置文件的索引看起来像这样

<?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>

如果我把它改成这个

<?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>

有什么方法可以使新索引生效而无需重新索引整个存储库?

4

1 回答 1

1

你可以:

  • 更改索引配置
  • 重新启动或重新打开存储库(以便读取配置更改)
  • 遍历所有相关节点,并“触摸”它们(修改属性,例如最后修改时间左右)。这样节点就会被重新索引
于 2013-10-02T10:10:55.783 回答