Exclude deleted shared blocks

Vote:
 

When exploring the index I can see that the block is marked as deleted ("IsDeleted$$bool": true). But I can't figure out how to exclude it from the search result. Tried these:

var query = SearchClient.Instance.Search<StaffBlock>().FilterForVisitor().GetResult();

var query = SearchClient.Instance.Search<StaffBlock>().Filter(x => (x as IContent).IsDeleted.Match(false)).GetResult();

#66897
Mar 12, 2013 11:40
Vote:
 

Stupid mistake by me, when moving FilterForVisitor() after all the other Filter() methods right before .GetResult() it works. (The code in the prev post wasn't the complete code)

#66898
Mar 12, 2013 11:53
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.