Author: knguyen
Date: Mon Sep 3 17:41:43 2007
New Revision: 18362
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18362&repname=
=3Djahia
Log:
cleaning and providing sample indexation rule declarations.
Modified:
branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-indexationpolicy.xml
branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-services.xml
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/a=
pplicationcontext-indexationpolicy.xml
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/WEB-INF/etc/spring/applicationcontext-indexationpol=
icy.xml&rev=3D18362&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-indexationpolicy.xml (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-indexationpolicy.xml Mon Sep 3 17:41:43 2007
@@ -2,12 +2,18 @@
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
- <bean id=3D"defaultContentIndexationRule" class=3D"org.jahia.services.=
search.indexingscheduler.impl.rule.BaseIndexationRule">
- <property name=3D"id" value=3D"1"/>
- <property name=3D"namedID" value=3D"DefaultContentIndexationRule"/>
- <property name=3D"name" value=3D"Default Content Indexation Rule"/>
- <property name=3D"indexationMode" value=3D"1"/>
- <property name=3D"conditions">
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- sample indexation rule to delay indexation of all Jahia Content a=
t specified times -->
+ <!--------------------------------------------------------------------=
-------------------->
+ <bean id=3D"delayedContentIndexationRule" class=3D"org.jahia.services.=
search.indexingscheduler.impl.rule.BaseIndexationRule">
+ <property name=3D"id" value=3D"1"/><!-- a unique id must be assign=
ed to each rule -->
+ <property name=3D"namedID" value=3D"delayedContentIndexationRule"/=
><!-- optional unique name used for declarative rule. -->
+ <property name=3D"name" value=3D"Delayed Content Indexation Rule"/=
><!-- human readable name or description -->
+ <property name=3D"indexationMode" value=3D"2"/><!-- Indexation mod=
e :
+ 0 =3D don't index, =
+ 1 =3D index immedi=
ately ( as soon as possible ), =
+ 2 =3D scheduled at=
specified time -->
+ <property name=3D"conditions"><!-- a rule returns true only if all=
its conditions evaluate to true -->
<list>
<bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.ContentTypeRuleCondition">
<property name=3D"allowAll" value=3D"true"/>
@@ -26,22 +32,9 @@
</list>
</property>
</bean>
- <bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.ActionRuleCondition">
- <property name=3D"allowAll" value=3D"true"/>
- <!-- More precise actions can be defined. Only used if=
allowAll =3D false.
- <property name=3D"allowedActions">
- <list>
- <value>ALL_ACTIONS</value>
- <value>ADD_ENGINE</value>
- <value>UPDATE_ENGINE</value>
- <value>DELETE_ENGINE</value>
- </list>
- </property>
- -->
- </bean>
</list> =
</property>
- <property name=3D"dailyIndexationTimes">
+ <property name=3D"dailyIndexationTimes"><!-- the range of allowed =
indexation time. Only used when the indexationMode =3D=3D 2 -->
<list>
<bean class=3D"org.jahia.services.search.indexingscheduler=
.TimeRange">
<property name=3D"startHour" value=3D"23"/>
@@ -52,12 +45,19 @@
</list> =
</property>
</bean>
- <bean id=3D"defaultFileFieldIndexationRule" class=3D"org.jahia.service=
s.search.indexingscheduler.impl.rule.BaseIndexationRule">
- <property name=3D"id" value=3D"2"/>
- <property name=3D"namedID" value=3D"DefaultFileFieldIndexationRule=
"/>
- <property name=3D"name" value=3D"Default File Field Indexation Rul=
e"/>
- <property name=3D"indexationMode" value=3D"1"/><!-- 0 =3D don't in=
dex, 1 =3D index immediately ( as soon as possible ), 2 =3D scheduled at sp=
ecified time -->
- <property name=3D"conditions">
+ =
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- sample indexation rule to delay indexation of File Field with pdf=
and office files at specified times -->
+ <!--------------------------------------------------------------------=
-------------------->
+ <bean id=3D"delayedFileFieldIndexationRule" class=3D"org.jahia.service=
s.search.indexingscheduler.impl.rule.BaseIndexationRule">
+ <property name=3D"id" value=3D"2"/><!-- a unique id must be assign=
ed to each rule -->
+ <property name=3D"namedID" value=3D"delayedFileFieldIndexationRule=
"/><!-- optional unique name used for declarative rule. -->
+ <property name=3D"name" value=3D"Delayed File Field Indexation Rul=
e"/><!-- human readable name or description -->
+ <property name=3D"indexationMode" value=3D"2"/><!-- Indexation mod=
e :
+ 0 =3D don't index, =
+ 1 =3D index immedi=
ately ( as soon as possible ), =
+ 2 =3D scheduled at=
specified time -->
+ <property name=3D"conditions"><!-- a rule returns true only if all=
its conditions evaluate to true -->
<list>
<bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.FileFieldRuleCondition">
<property name=3D"fileExtensions">
@@ -71,8 +71,7 @@
</bean>
</list> =
</property>
- <!-- Example of scheduling indexation at specified times, only use=
d if indexationMode=3D2 -->
- <property name=3D"dailyIndexationTimes">
+ <property name=3D"dailyIndexationTimes"><!-- the range of allowed =
indexation time. Only used when the indexationMode =3D=3D 2 -->
<list>
<bean class=3D"org.jahia.services.search.indexingscheduler=
.TimeRange">
<property name=3D"startHour" value=3D"23"/>
@@ -83,12 +82,19 @@
</list> =
</property>
</bean>
+
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- sample indexation rule used to schedule Blog Content for immediat=
e indexation ( as soon as possible, using the indexation normal flow ) -->
+ <!--------------------------------------------------------------------=
-------------------->
<bean id=3D"blogContentIndexationRule" class=3D"org.jahia.services.sea=
rch.indexingscheduler.impl.rule.BaseIndexationRule">
- <property name=3D"id" value=3D"3"/>
- <property name=3D"namedID" value=3D"BlogContentIndexationRule"/>
- <property name=3D"name" value=3D"Blog Content Indexation Rule"/>
- <property name=3D"indexationMode" value=3D"1"/>
- <property name=3D"conditions">
+ <property name=3D"id" value=3D"3"/><!-- a unique id must be assign=
ed to each rule -->
+ <property name=3D"namedID" value=3D"blogContentIndexationRule"/><!=
-- optional unique name used for declarative rule. -->
+ <property name=3D"name" value=3D"Blog Content Indexation Rule"/><!=
-- human readable name or description -->
+ <property name=3D"indexationMode" value=3D"1"/><!-- Indexation mod=
e :
+ 0 =3D don't index, =
+ 1 =3D index immedi=
ately ( as soon as possible ), =
+ 2 =3D scheduled at=
specified time -->
+ <property name=3D"conditions"><!-- a rule returns true only if all=
its conditions evaluate to true -->
<list>
<bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.ContentTypeRuleCondition">
<property name=3D"allowAll" value=3D"false"/>
@@ -100,28 +106,82 @@
-->
<property name=3D"allowedContentTypes">
<list>
- <!--value>ContentPage</value-->
- <!--value>ContentContainer</value-->
+ <value>ContentPage|name_blog</value>
+ <value>ContentPage|name_blogListing</value>
<value>ContentContainer|name_blogEntries</valu=
e>
<value>ContentContainer|name_comments</value>
- <!--value>ContentContainer|id_43</value-->
</list>
</property>
</bean>
- <bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.ActionRuleCondition">
- <property name=3D"allowAll" value=3D"true"/>
- <!-- More precise actions can be defined. Only used if=
allowAll =3D false.
- <property name=3D"allowedActions">
+ </list> =
+ </property>
+ </bean>
+
+
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- sample indexation rule used to exclude all content bellow a given=
Page node =
+ ( specifying its page id ) from indexation. -->
+ <!--------------------------------------------------------------------=
-------------------->
+ <bean id=3D"excludedSubTreeIndexationRule" class=3D"org.jahia.services=
.search.indexingscheduler.impl.rule.BaseIndexationRule">
+ <property name=3D"id" value=3D"4"/>
+ <property name=3D"namedID" value=3D"excludedSubTreeIndexationRule"=
/>
+ <property name=3D"name" value=3D"excluded SubTree Indexation Rule"=
/>
+ <property name=3D"indexationMode" value=3D"0"/><!-- Indexation mod=
e :
+ 0 =3D don't index, =
+ 1 =3D index immedi=
ately ( as soon as possible ), =
+ 2 =3D scheduled at=
specified time -->
+ <property name=3D"conditions">
+ <list>
+ <bean class=3D"org.jahia.services.search.indexingscheduler=
.impl.condition.ContentPagePathRuleCondition">
+ <property name=3D"parentNodePages">
<list>
- <value>ALL_ACTIONS</value>
- <value>ADD_ENGINE</value>
- <value>UPDATE_ENGINE</value>
- <value>DELETE_ENGINE</value>
+ <value>3</value><!-- will match all content th=
at are child of sub child of the parent page node 3 -->
</list>
</property>
- -->
</bean>
</list> =
</property>
</bean>
+ =
+ <!-- The bean bellow is used to add the list of Jahia Content Indexati=
on Rules to the JahiaSearchIndexationService --> =
+ <bean id=3D"contentIndexationRulesList" class=3D"org.springframework.b=
eans.factory.config.ListFactoryBean">
+ <property name=3D"sourceList">
+ <list>
+ <!-- uncomment each rule bean you want to use -->
+ <!--ref bean=3D"delayedContentIndexationRule"/-->
+ <!--ref bean=3D"blogContentIndexationRule"/-->
+ <!--ref bean=3D"excludedSubTreeIndexationRule"/-->
+ </list>
+ </property>
+ </bean>
+
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- The bean bellow is used to define the list of Jahia Content Inde=
xation Rules that will
+ be used by the JahiaSearchIndexationService --> =
+ <!--------------------------------------------------------------------=
-------------------->
+ <bean id=3D"contentIndexationRulesList" class=3D"org.springframework.b=
eans.factory.config.ListFactoryBean">
+ <property name=3D"sourceList">
+ <list>
+ <!-- uncomment each rule bean you want to add to the list =
-->
+ <!--ref bean=3D"delayedContentIndexationRule"/-->
+ <!--ref bean=3D"blogContentIndexationRule"/-->
+ <!--ref bean=3D"excludedSubTreeIndexationRule"/-->
+ </list>
+ </property>
+ </bean>
+
+ <!--------------------------------------------------------------------=
-------------------->
+ <!-- The bean bellow is used to define the list of File Field Indexat=
ion Rules that will
+ be used by the JahiaSearchIndexationService --> =
+ <!--------------------------------------------------------------------=
-------------------->
+ <bean id=3D"fileFieldIndexationRulesList" class=3D"org.springframework=
.beans.factory.config.ListFactoryBean">
+ <property name=3D"sourceList">
+ <list>
+ <!-- uncomment each rule bean you want to use -->
+ <!--ref bean=3D"delayedFileFieldIndexationRule"/-->
+ </list>
+ </property>
+ </bean>
+
+
</beans>
Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/a=
pplicationcontext-services.xml
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/webapp/WEB-INF/etc/spring/applicationcontext-services.xml&=
rev=3D18362&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-services.xml (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/webapp/WEB-INF/etc/spring/applica=
tioncontext-services.xml Mon Sep 3 17:41:43 2007
@@ -606,17 +606,11 @@
<bean id=3D"JahiaSearchIndexationService" parent=3D"proxyTemplate">
<property name=3D"target">
<bean class=3D"org.jahia.services.search.indexingscheduler.Jah=
iaSearchIndexationService" parent=3D"jahiaServiceTemplate" factory-method=
=3D"getInstance">
- <property name=3D"defaultContentIndexationRule">
- <ref bean=3D"defaultContentIndexationRule"/>
- </property>
- <property name=3D"defaultFileFieldIndexationRule">
- <ref bean=3D"defaultFileFieldIndexationRule"/>
- </property>
<property name=3D"contentIndexationRules">
- <list>
- <ref bean=3D"defaultContentIndexationRule"/>
- <ref bean=3D"blogContentIndexationRule"/>
- </list>
+ <ref bean=3D"contentIndexationRulesList"/>
+ </property>
+ <property name=3D"fileFieldIndexationRules">
+ <ref bean=3D"fileFieldIndexationRulesList"/>
</property>
</bean>
</property>
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list