Thursday, April 16, 2009

How to make Alfresco lucene index store the time part of a datetime field

Due to Alfresco bug [#1791] Lucene indexes contain only date not time, the lucene index in Alfresco only stores the date part of a datetime field. Thought it is fixed from 2.1.1E on, the time is not stored by default in order to maintain backwards compatibility with old indexes.

To solve this problem you should:
  1. Update your (located under WEB-INF/classes/alfresco/model or config/alfresco/model if you are using AMP module)

  2. Rebuild your Lucene indexes by adding the following line to /tomcat/shared/classes/alfresco/extension/


    Once the rebuild process finishes (look at your log file), remember to remove the line added so you don't rebuild your indexes every time you restart your webapp


Kaisha said...

Having same issue. I do not understand or see what you replaced. Both entries are the same. please help

Kaisha said...

browser issues....unfortunately the sentences are cut off, but i copied to note pad and all seems ok.