0

I have been successful ordering the results by the jcr:lastModified field. I cannot seem to filter the results by the lastModified date field. The query looks like the following.

//Found at http://docs.jboss.org/exojcr/1.12.11-GA/developer/en-US/html/ch-jcr-query-usecases.html#JCR.DatePropertyComparison

select * from nt:resource where ( jcr:lastModified >= TIMESTAMP '2006-06-04T15:34:15.917+02:00' )

It only returns a 500 server error.

Any Ideas?

Thank you,

Paul

Paul Johnson
  • 121
  • 5

1 Answers1

0

OK,

So here is the answer. It took a lot of messing around to get it to work, but here is the query.

select * from nt:base where( jcr:lastModified>= TIMESTAMP '2010-02-01T00:00:00.000Z')

I hope this helps someone else, the documentation on this stuff is slim and sketchy.

Paul

Paul Johnson
  • 121
  • 5
  • Just be aware that you should also check for `lastModified`, not just `jcr:lastModified`, according to [Sling's documentation](https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#automatic-property-values-last-modified-and-created-by). – Dan Bourque Jul 06 '18 at 18:39