This content is archived. See latest version here.

Last updated: Jun 10 2014


By default all public properties on an object are included when indexing it. Below we describe how properties can be excluded.


The simplest way to exclude a property is to annotate it with the JsonIgnore attribute (found in the Newtonsoft.Json namespace).

using Newtonsoft.Json;

public class User
    public string Username { get; set; }

    public string Password { get; set; }

It is also possible to exclude properties, or other previously included fields, by customizing the Client conventions.

//using EPiServer.Find.ClientConventions;

        .ExcludeField(x => x.Password);

The above code excludes the Password property from instances of the User class as well as instances of classes that inherit the User class.


JsonIgnore doesn't work without Searchable(False) [JsonIgnore] [Display( Name = "Some Field not 2 show", GroupName = SystemTabNames.Content, Order = 600), Searchable(false)] public virtual XhtmlString HiddenFromSearchResults { get; set; }