2013-09-24 56 views
0

是否有任何方法可以將新索引添加到jacrkabbit存儲庫,而不必重新編制整個存儲庫?jackrabbit添加新索引

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> 

是沒有任何方法,新的索引取效果,而不必重新索引整個存儲庫?

回答

1

,你可以:

  • 更改索引配置
  • 重新啓動或重新打開庫(所以配置更改讀)
  • 遍歷了所有相關的節點,「觸摸」他們(修改財產,例如最近修改時間左右)。這樣節點重新索引
+0

謝謝你的回答。最後,我決定重新編制整個存儲庫,儘管我們每個站點都需要大約3個小時。 – Menzi