I have some documents stored in Raven, which have a CreationDate property, of type "DateTimeOffset". I have been attempting to get these documents returned in a query from C#, and they are never returned if I use the CreationDate in the query criteria.
After watching the Raven console, I saw the query being issued was:
Query: (FeedOwner:25eb541c\-b04a\-4f08\-b468\-65714f259ac2) AND ( Creati
onDate:[20120524120000000 TO NULL] AND CreationDate:{* TO 20120525120000000})
I ran this query directly against HTTP, and changed the date format to:
Query: (FeedOwner:25eb541c\-b04a\-4f08\-b468\-65714f259ac2) AND ( Creati
onDate:[2012-05-24120000000 TO NULL] AND CreationDate:{* TO 2012-05-25120000000})
And now it works - it returns my documents which DEFINITELY fall within the range. Is Raven generating the incorrect date format for lucene? If so, how do I fix this?
Notes:
- Yes I need time zone support
- Yes I need Time aswell as Date in my index.
Thanks
[EDIT] Err... I just changed my entities to use DateTime, just for giggles... and it still fails to return the data... whats going on??? Im using RavenDB.Server.1.2.2002-Unstable