U4-8417 - Backoffice Member Search by Custom Properties

Created by Marc Goodson 05 May 2016, 12:15:42 Updated by keilo 20 Sep 2017, 07:01:55

Relates to: U4-10416

If you have added a custom property to a member type, eg 'Company Name' it would be nice when you are in the top left hand search box in the backoffice, if you typed in the name of that company, that Members were returned that matched the searched for name, based on their entries in the Custom Property.

You can add the Custom Property to the InternalMemberIndex in the hope that this would work, but it doesn't.

This is because in the /Umbraco.Web/Editors/EntityController.cs that eventually does this search, the list of fields searched for members is hardcoded to be id,NodeId, email and loginName:

case UmbracoEntityTypes.Member: searcher = Constants.Examine.InternalMemberSearcher; type = "member"; fields = new[] { "id", "__NodeId", "email", "loginName"}; if (searchFrom != null && searchFrom != Constants.Conventions.MemberTypes.AllMembersListId && searchFrom.Trim() != "-1") { sb.Append("+__NodeTypeAlias:"); sb.Append(searchFrom); sb.Append(" "); } break;

Would be a great feature if it were possible to configure this list of fields somewhere and add your custom properties.

Comments

keilo 26 Apr 2017, 16:01:23

Stumble upon this when trying to figure why custom member property was showing in examine search under Developer, but not the Global umbraco search. Running 7.5.9 and it seems its not in 7.6 either. Is there any plans of adding this?


Shannon Deminick 20 Sep 2017, 00:31:05

With ISearchableTree in the core, you can replace the search mechanism for any tree during startup. I would suggest trying this to see if you can achieve what you want before we add any further configuration to the CMS. The docs to replace an ISearchableTree implementation is in this issue description: http://issues.umbraco.org/issue/U4-2676


keilo 20 Sep 2017, 07:01:55

it would be great if it would be possible to configure the list of fields somewhere (config or Developer UI) and add your custom properties. Taking into account everyone is dealing with custom properties, in my particular case heavily members but seen others in need of the same for content and media, an approach to make this simple would be great instead of writing search mechanism; some approach that will appeal to everyone like selecting columns in the Custom List View UI where custom fields can be selected.


Priority: Normal

Type: Feature (request)

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.3

Due in version:

Sprint:

Story Points:

Cycle: