Page 1 of 1

Search using Modified/Created Date comparison

PostPosted:Wed Jan 07, 2009 11:17 am
by bragarwal
Hi,
I am developing a search functionality to retrieve all documents from last modified/created date till the current date.
I know this can be achieved using XPath query and passing it in findByStatement() method provided via Search webservice.
I am looking forward if someone can help me out formulating the XPath query to search documents by comparing the Dates in OpenKM.
What are the OpenKM MetaData keys for Document modified date and created date from OpenKM repository.
In which format the date gets retrieved using XPath, so that I can pass the input date in the XPath query for comparison in Java to compare the System date and OpenKM document dates.
Also whether OpenKM version 3 supports XPath 1.0 or 2.0.
How do I know which OpenKM MetaData keys linked with the document properties in the repository.
Please let me know the answers as I am in middle of implementing advanced search features using XPath using Date comparison.

Re:Search using Modified/Created Date comparison

PostPosted:Fri Jan 09, 2009 4:33 am
by bragarwal
I have formed an XPath query to solve the problem, logically it seems correct but when i try to execute it using OpenKM GUI interface, it fails. Please find the query below:

/jcr:root/okm:root//element(*,okm:document)[@okm:content/jcr:lastModified >= xs:dateTime(\'2008-07-20T00:00:00.000Z\')]

where the arguement in xs:dateTime(\'\') is an ISO8601 formatted date. I just wanted to fetch all the document/folders who whose last modified date is greator than the given modifieDate.

Please Pavila/jllort help me out in solving this problem. Atleast let me know if I am doing it right or not.

Re:Search using Modified/Created Date comparison

PostPosted:Fri Jan 09, 2009 10:20 am
by pavila
I\'have tested and works pretty well.