public class TestObj{ public long Id { get; set; } public long? Parent { get; set}}
Query<TestObj>(). Where(x => x.Parent != null);
Id Parent 33 0 161 0 162 0 163 0 164 163 193 1 225 1 226 1 289 0 321 1 417 1 449 1 481 1
Query<TestObj>(). Where(x => x.Parent == null);
or
Query<TestObj>(). Where(x => !x.Parent.HasValue);
{ "Parent": null
}
What client version are you using and what server version?
Can you check through fiddler what is sent to the server? I believe your query should look something like this : Parent:[[NULL_VALUE]]
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
There should not be any problem querying for null values as you are doing. Are you able to reproduce this in an isolated test?
#30156 for the Client / Server build.I'm using LinqPad for this particular query, and it doesn't seem to route through Fiddler so I can't see the queries. The other place it's located is inside a controller on a server (although not using test objects) so unless I do a reverse proxy I won't be able to see the actual requests.
--
Well, it is hard to tell what's going on without having the data. Is there a chance the index is stale? Was there a dirty shutdown of the server? Can you generate the same index under a different name and query it when it is not stale (it might be that the index for corrupted due to dirty shutdown).
Does that problem happen on a specific document or all of the documents whom their parent is null? If it's all of then can you share the index definition and the c# classes used in the index (including the ones been loaded)?
--
Can you add the raw query too?
Hibernating Rhinos Ltd
Maxim Buryak l Core Team Developer l Mobile:+972-54-217-7751
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple" http://ravendb.net/
Can you please check if you have numeric (or any other) sort defined on the field in question
Best Regards,Hibernating Rhinos Ltd
Maxim Buryak l Core Team Developer l Mobile:+972-54-217-7751
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple" http://ravendb.net/
On Mon, Oct 17, 2016 at 10:41 PM, Tal Weiss <t...@ayende.com> wrote:
Can you add the raw query too?
On Oct 17, 2016 22:39, <ml.se...@medialabinc.com> wrote:
I did get Fiddler to work. Turns out, I had forgotten I hid all raven calls since they cluttered up the fiddler window.--http://[internalurl]/databases/BuilderProducts/indexes/dynamic/Users?&query=ClientId%3A%5B%5BNULL_VALUE%5D%5D&pageSize=128is the query. Returns nada.
http://live-test.ravendb.net/databases/RAllenTest/indexes/dynamic/Users?&query=ClientId%3A%5B%5BNULL_VALUE%5D%5D&pageSize=128returns my "User" object just fine.
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
In that case, I would recommend using static indexes. The automatic mechanism will still be able to choose the right index.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.