Vulnerability in EPiServer.Forms
Hi I am trying to use an API documented on http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/12/Integration/episerver-7-5/Indexing/
But the example for "ExcludeField" provided doesn't seem to work with Episerver.Find.Cms 12.2.4
.ExcludeField(x => x.ACL)
Which usings do you have?
Hopefully it's something easy I've missed :)
Oh and I've also added:
But no luck yet..
Okay, apparently since Epi v7.5 it should be done like this:
EPiServer.Find.Framework.SearchClient.Instance.Conventions.ForInstancesOf<PageData>().ExcludeField(x => x.ACL); // with using EPiServer.Find.ClientConventions;
Not sure why the official documentation suggests otherwise though.
OK! Note that it will only be in play on queries. ShouldIndex() is still on ContentIndexer if you want to stop a full IContent to going to the index and I think the recommended approach to not put a property's data in the index is to use the JsonIgnore-attribute.
Where are you trying to add it?
Could you show us the complete class where it does not work?
It does work with the above code that I marked as the answer.