I would like to get a different label for a facet, than the property value returned by default by the Search API.
I'm using the Alfresco Public Rest API Search Service for an ADF application, with facets.
The labels of the facets are returned by the API with the following schema :
The content of the "label" property is the value of the property in the contentstore by default. There is also a "display" property, which is used for a custom display ("Display name" for users-based buckets for example)
Within the source code, we can see that the "display" field is computed through a PropertyLookupRegistry, that registers custom PropertyLookup for some properties, like for example to return user "displayName" instead of its "username" (PersonPropertyLookup).
I've thus tried to create my custom PropertyLookup for my custom properties, and register it in my module context, by overriding the publicapi.propertyLookups bean.
<bean id="publicapi.myPropertyLookup" class="my.Class">
</bean><bean id="publicapi.propertyLookups" class="org.alfresco.rest.api.lookups.PropertyLookupRegistry">
<ref bean="publicapi.personPropertyLookup" />
<ref bean="publicapi.mimeTypePropertyLookup" />
The property lookup is correctly loaded, but do not seems to be used by the registry when running a search query through the API (the "display" property is empty...)
Does anyone has already done that ? I am doing something wrong ?