cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS and date time search

romschn
Star Collaborator
Star Collaborator
Hi,

I have read on wiki(http://wiki.alfresco.com/wiki/CMIS_Query_Language - Section-dateTime) and also observed that Date collation ignores time by default.

I have two records in my repository for which the modified date timestamp is different.
Content-1 modification date - 2011-12-16T14:17:44.815+05:30
Content-2 modification date - 2011-12-16T14:25:48.108+05:30

My below CMIS query :
SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP '2011-12-15T14:20:00.000-00:00' 
is always returning me the above 2 records. It is not considering the timestamp for search and doing search based on date only. As per the timestamp in the query I should have got Content-2 as a result only.

I want to search based on timestamp. Could anyone please help me on this.

Thanks,
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Assuming you are not using SOLR have you changed your lucene analyzer and reindexed?

romschn
Star Collaborator
Star Collaborator
I am not using SOLR. Currently I am using alfresco v 3.4.3.

Could you please let me know which classes/changes I will be required to do the LuceneAnalyzer?

I have analyzed that modified date is using org.alfresco.repo.search.impl.lucene.analysis.DateTimeAnalyser class.
Could you please let me know which changes are required to it?

Awaiting your reply.

Thanks,

mrogers
Star Contributor
Star Contributor
Please read the last paragraph on the document you referenced or ALF-5378