How to match null value in Filter method in Epi find query



I am getting error when i have written below query. Can anyone help me ,how to match "null" value in Filter method in Epi find query.

My query is mentioned below:-i am getting error for this "null" value matching in epi find query which is mentioned in BOLD in the below

var result = SearchClient.Instance.Search().For(listingParametersModel.FreeText).Filter(x => x.Ancestors().Match(ContentReference.StartPage.ID.ToString())).Filter(x => x.CategoryTag.ID.Exists()).Filter(x =>x.CategoryTag.ID.Match(epiRepository.GetSiteSettings.PressReleaseTag.ID))
.Filter(x =>x.HuginTypeCode.Match("5") | x.HuginTypeCode.Match(null))

Thanks in advance.


Apr 07, 2017 16:47

Episerver Find does not save null value, so I belive that the best way to do this would be to check if it does not exist (!x.HuginTypeCode.Exists())

Apr 07, 2017 20:32
* 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.