Google Groups

RE: [RavenDB] RE: Strange date query behavior


Mauro Servienti Apr 10, 2012 2:42 AM
Posted in group: RavenDB - 2nd generation document database

Amazing, that did the trick, I did not know.

What should be the value? Analyzed or Default?

 

.m

 

 

From: rav...@googlegroups.com [mailto:rav...@googlegroups.com] On Behalf Of Oren Eini (Ayende Rahien)
Sent: martedì 10 aprile 2012 11:39
To: rav...@googlegroups.com
Subject: Re: [RavenDB] RE: Strange date query behavior

 

What index is this using? The only time the index would retain dates in this format:  : [2010-02-01 TO 2012-02-01] 

is when you are saving the dates using not analyzed.

On Tue, Apr 10, 2012 at 12:20 PM, Mauro Servienti <ma...@topics.it> wrote:

If I change the Lucene query to this:

LastMessageDeliveredAt: [2010-02-01 TO 2012-02-01]

 

It works as expected, now running the same using Linq:

 

var limit = DateTimeOffset.Now.AddMonths( -2 ).Date;

mailboxSession.Query<BlaBla, BlaBla>().Where( c => c.LastMessageDeliveredAt <= limit )

 

does not work, how can I see which Lucene query gets produced?

 

.m

 

From: rav...@googlegroups.com [mailto:rav...@googlegroups.com] On Behalf Of Mauro Servienti
Sent: martedì 10 aprile 2012 11:00
To: rav...@googlegroups.com
Subject: [RavenDB] Strange date query behavior

 

Hi,

 

Running 701, cannot update to a newer build at the moment.

 

I have an index that produces a projection that has a lot of properties among which there are some date/time properties:

 

"LastMessageDeliveredAt": "2012-04-10T08:42:27.8296290+00:00"

(in json seen from the studio)

 

Now, issuing this query (from the studio):

LastMessageDeliveredAt: [20100201 TO 20120201]

 

Does _not_ filter out the document that has the above value, if I issue this query

LastMessageDeliveredAt: [20100201 TO 20110201]

 

Changing the year from 2012 to 2011 documents are correctly filtered.

 

Any idea?

.m