I'm having a bit of trouble with the PublicSearchFilter where basically want to hide all pages of a certain type (perhaps there is another way to do this but I'm unsure). To be clear, I only want to hide these from the public search but still want them to appear in the CMS.
I've managed to implement this, but it just incredibly dirty:
.PublicSearchFilter(x => x.BuildFilter().And(y => ReturnFalse().Match(true)));
Where ReturnFalse() obviously returns false. I had to this this because having false.Match(true) is not valid because it's a constant. There must be a cleaner way or existing way to achieve this?
How about something like
.PublicSearchFilter(x => x.BuildFilter<InformationAndSupportLocationPage>().And(p => !p.MatchType(typeof(InformationAndSupportLocationPage))));