You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Christophe Lombart <ch...@gmail.com> on 2005/09/27 20:39:37 UTC
Search on date properties
I'm looking for some search examples based on dates.
Is it a correct search expression : //element(*, nt:unstructured)
[@calendar <= TIMESTAMP '2005-09-27T00:00:00.000+01:00']
I got the following exception whih this expression :
javax.jcr.query.InvalidQueryException: Encountered
"\'2005-09-27T00:00:00.000+01:00\'" at line 1, column 66.
Was expecting one of:
"or" ...
"and" ...
"div" ...
"idiv" ...
"mod" ...
"*" ...
"to" ...
"intersect" ...
"union" ...
"except" ...
<Instanceof> ...
<Castable> ...
"/" ...
"//" ...
"-" ...
"+" ...
"|" ...
"[" ...
"]" ...
<CastAs> ...
<TreatAs> ...
"," ...
Are there other ways to build queries on date properties ?
Thanks,
Christophe
Re: Search on date properties
Posted by Jakub Pawlowicz <co...@jakubpawlowicz.com>.
Hi Christophe,
You may take a look at http://mail-archives.apache.org/mod_mbox/
incubator-jackrabbit-dev/200508.mbox/%
3cF4E598B5-6917-4750-9275-7B82F9ED67B9@jakubpawlowicz.com%3e
I've got the same problem, so this could help you a bit.
Regards
Jakub
On Sep 27, 2005, at 8:39 PM, Christophe Lombart wrote:
> I'm looking for some search examples based on dates.
>
> Is it a correct search expression : //element(*, nt:unstructured)
> [@calendar <= TIMESTAMP '2005-09-27T00:00:00.000+01:00']
>
> I got the following exception whih this expression :
>
> javax.jcr.query.InvalidQueryException: Encountered
> "\'2005-09-27T00:00:00.000+01:00\'" at line 1, column 66.
> Was expecting one of:
> "or" ...
> "and" ...
> "div" ...
> "idiv" ...
> "mod" ...
> "*" ...
> "to" ...
> "intersect" ...
> "union" ...
> "except" ...
> <Instanceof> ...
> <Castable> ...
> "/" ...
> "//" ...
> "-" ...
> "+" ...
> "|" ...
> "[" ...
> "]" ...
> <CastAs> ...
> <TreatAs> ...
> "," ...
>
>
> Are there other ways to build queries on date properties ?
>
> Thanks,
> Christophe
>
>