Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.

 

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

Vote:
 

Hi,

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(CategoryTagFilter)
.Filter(x =>x.HuginTypeCode.Match("5") | x.HuginTypeCode.Match(null))

Thanks in advance.

Sourav

#177328
Apr 07, 2017 16:47
Vote:
 

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())

#177329
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.