Alfresco 5: Customizing facet filter for future dates

From Alfresco 5, faceted search is available in Share web app.

However, when using dates, only past facets are available (yesterday, last week…). When using future dates in customized metadata, some modifications are required.

Following instructions can be deployed as an standard Repository extension project  by using Alfresco SDK.

Overriding date facets Spring beans from Alfresco to add extra classification must be included in service-context.xml

<!-- Include your own customized properties from content model: futureDate -->
<bean id="facet.dateFacetFields" class="org.springframework.beans.factory.config.SetFactoryBean">
   <property name="sourceSet">

<!-- Include different categories for future dates: next year, next six months... -->
<bean id="facet.dateBuckets" class="org.springframework.beans.factory.config.MapFactoryBean">
   <property name="sourceMap">
               <entry key="[NOW/DAY+1DAY TO NOW/DAY+1YEAR]" value="Next year" />
               <entry key="[NOW/DAY+1DAY TO NOW/DAY+6MONTHS]" value="Next six months" />
               <entry key="[NOW/DAY+1DAY TO NOW/DAY+1MONTH]" value="Next month" />
               <entry key="[NOW/DAY+1DAY TO NOW/DAY+7DAYS]" value="Next week" />
               <entry key="[NOW/DAY-1DAY TO NOW/DAY+1DAY]" value="" />
               <entry key="[NOW/DAY-7DAYS TO NOW/DAY+1DAY]" value="" />
               <entry key="[NOW/DAY-1MONTH TO NOW/DAY+1DAY]" value="" />
               <entry key="[NOW/DAY-6MONTHS TO NOW/DAY+1DAY]" value="" />
               <entry key="[NOW/DAY-1YEAR TO NOW/DAY+1DAY]" value="" />

Once this module is deployed, future dates are classified in the future in faceted search Alfresco page.


This functionality may be modified in the future. This article has only been tested with Alfresco CE 5.0.d




Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s