cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Search - Date range - created, modified not working

shikarishambu
Champ in-the-making
Champ in-the-making
I am trying to create a webscript that would return all documents within a given date range - createed date / modified date

I have the following in my webscript

query = '+@sp\\:created:\"[' + createdFrom.Format("isoDateTime") + ' TO ' + createdTo.Format("isoDateTime") +  ']" '

sp is the prefix related to my custom content model

This does not return anything even though I have documents that match that range. I then tried this

query = '+@cm\\:created:\"[MIN TO NOW]"'

Same result. Changing cm with sp does not change the results.

I tried the same queries in the node browser. I get the same result - no documents are returned.

I used the web client's advanced search and provided the criteria and it works - returns documents.

Am I specifying the query correctly?
1 REPLY 1

shikarishambu
Champ in-the-making
Champ in-the-making
Oops, the double quotes
@sp\\:created:\[MIN TO NOW]
Works