Backoffice Search

    The search facility of the Umbraco Backoffice allows the searching 'across sections' of different types of Umbraco entities, eg Content, Media, Members. However 'by default' only a small subset of standard fields are searched:

    Node Type Propagated Fields
    All Nodes Id, __NodeId and __Key
    Media Nodes UmbracoFileFieldName
    Member Nodes email, loginName

    However, a specific Umbraco implementation may have additional custom properties that it would be useful to be considered in a Backoffice Search, for example perhaps there is an 'Organisation Name' property on the Member Type, or the 'Main Body Text' property of a Content item.

    Umbraco 8.6 introduced a new easy way to extend/override the default fields by implementing IUmbracoTreeSearcherFields. This service exposes the list of default internal search fields for each section and allows modification of them.

    All Node types

    public class CustomUmbracoTreeSearcherFields : UmbracoTreeSearcherFields,     IUmbracoTreeSearcherFields
    {
        public List GetBackOfficeFields()
    
        {
            var list = base.GetBackOfficeFields();
            list.Add("parentID");
            return list;
        }
    }

    Documents types

    public class CustomUmbracoTreeSearcherFields : UmbracoTreeSearcherFields,     IInternalSearchConstants
    {
        public List GetBackOfficeDocumentFields()
        {
            var list = base.GetBackOfficeDocumentFields();
            list.Add("parentID");
            return list;
        }
    }

    Media Types

    public class CustomUmbracoTreeSearcherFields : UmbracoTreeSearcherFields,     IUmbracoTreeSearcherFields
    {
        public List GetBackOfficeMediaFields()
        {
            var list = base.GetBackOfficeMediaFields();
            list.Add("parentID");
            return list;
        }
    }

    Member Types

    public class CustomUmbracoTreeSearcherFields : UmbracoTreeSearcherFields,     IUmbracoTreeSearcherFields
    {
        public List GetBackOfficeMembersFields()
        {
            var list = base.GetBackOfficeMembersFields();
            list.Add("parentID");
            return list;
        }
    }

    More advanced extensions

    For further extensibility of the Umbraco Backoffice search implementation check ISearchableTree