Try our conversational search powered by Generative AI!

Search for null objects



I need to find all objects which doesn't have any categories.

At the moment I've tried something like this:

query = query.Filter(x => x.SearchCategories.IsNull().Match(true));

But it doesn't work. Is it possible to search for null values?

Jan 10, 2014 13:27

You should be able to use .Exists(): 

query = query.Filter(x => x.SearchCategories.Exists());


Jan 10, 2014 14:17

Thank you! It works beautifuly.

Ended using it like this:

query = query.Filter(x => !x.SearchCategories.Exists());

Jan 10, 2014 14:36
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.