jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vibhu Sharma <vi...@projectoffguard.com>
Subject SQL query with date range - 1.6
Date Thu, 01 Apr 2010 11:16:51 GMT
Hi

I am trying to do a date range query in Jackrabbit 1.6. From what I have
understood from the net and
this<http://markmail.org/message/rvbu2wqmnyvbfe54>[1]
thread is that following should work:

select * from ofgd:content where posted_on >= TIMESTAMP'2010-03-10T22:54:33.
401+05:30'

- where posted_on is a 'date' type property

but this gives an InvalidQueryException with the following stack trace

        at
org.apache.jackrabbit.spi.commons.query.sql.JCRSQLQueryBuilder.createQuery(JCRSQLQueryBuilder.java:166)
        at
org.apache.jackrabbit.spi.commons.query.sql.QueryBuilder.createQueryTree(QueryBuilder.java:39)
        at
org.apache.jackrabbit.spi.commons.query.QueryParser.parse(QueryParser.java:57)
        at
org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(QueryImpl.java:93)
        at
org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(SearchIndex.java:668)
        at
org.apache.jackrabbit.core.query.QueryImpl.init(QueryImpl.java:128)
        at
org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:290)
        at
org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:102)

Can somebody help me on this.


[1] http://markmail.org/message/rvbu2wqmnyvbfe54

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message