Hi, we want to search the member section using the custom member properties on the Member Type. It will be useful to the support team if they can search for members using the organization name and organization id properties that each member has.
According to the documentation we need to:
Index the member fields
Override the UmbracoCustomSearchFields class
Index the member fields
By default only username and email are indexed but this can be changed by changing the indexing as described here:
This seems to be working as we can search on the member properties in the Examine Management dashboard. We can see all of the member properties are in the index.
Override the UmbracoCustomSearchFields class
By default the member search will only search on the username and email.
This page in the documentation describes how to override the default field list by implementing IUmbracoTreeSearcherFields, a feature introduced in v8.6. but I feel like a step is missing in the guide.
I found that I needed to register the custom UmbracoTreeSearchFields class in a composer class.
public class UmbracoTreeSearcherFieldsComposer : IUserComposer
{
public void Compose(Composition composition)
{
composition.RegisterUnique<IUmbracoTreeSearcherFields, CustomUmbracoTreeSearcherFields>();
}
}
Backoffice Member search
Hi, we want to search the member section using the custom member properties on the Member Type. It will be useful to the support team if they can search for members using the organization name and organization id properties that each member has.
According to the documentation we need to:
Index the member fields
By default only username and email are indexed but this can be changed by changing the indexing as described here:
https://our.umbraco.com/documentation/Reference/Searching/Examine/indexing/
This seems to be working as we can search on the member properties in the Examine Management dashboard. We can see all of the member properties are in the index.
Override the UmbracoCustomSearchFields class
By default the member search will only search on the username and email.
This page in the documentation describes how to override the default field list by implementing IUmbracoTreeSearcherFields, a feature introduced in v8.6. but I feel like a step is missing in the guide.
https://our.umbraco.com/Documentation/Extending/Backoffice-Search/
How does the custom class get loaded?
Thanks
Dallas
I found that I needed to register the custom UmbracoTreeSearchFields class in a composer class.
The details are in this answer:
https://our.umbraco.com/packages/backoffice-extensions/ugardian/support/105083-search-in-custom-member-attributes#328062
is working on a reply...