cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene date syntax

simon
Champ in-the-making
Champ in-the-making
Alfresco,

I'm looking for the correct way to retrieve documents modified between day A and day B. This will be a Lucene search but the syntax is confusing. How should the search be formatted? On the wiki it says that the date is ignored (but it needs to be specified or not?) the forum tells a different story where sometimes the date is added, sometimes not.

The following search works in de node browser but always returns the same 12 documents, even if you specify "something" instead of a date. What am I missing?

@cm\:modified\:"2007-05-01 TO 2007-05-20"

Thanks!
1 REPLY 1

simon
Champ in-the-making
Champ in-the-making
For future reference, this seems to work:
@cm\:modified:[2007-05-01T00:00:00 TO 2007-05-20T00:00:00]
I don't know but it seems you need the time value even if it doesn't work. You need the first slash after the cm but you can not use a slash after modified.

If you want to use this query in JavaScript you'll have to add a second slash after cm like this:
@cm\\:modified:[2007-05-01T00:00:00 TO 2007-05-20T00:00:00]