Facet Transformer

Description

I've been reviewing the new facet engine documentation and as something to consider I was thinking of FacetResultTransformers.

Let's say we have a facet called "color". It can be red, green or blue. But because we're in an international context, we store a colorId. So, that we can apply a translated label to the color when displayed to the end user.

In terms of a Facet Result, you would get these ids back. As a next step you will then loop over the result and take each id and get the appropriate translation. Perhaps this could be a candidate for a ResultTransformer at FacetManager level.

In terms of Facet interface, you could consider a getLabel() method. Which would return the value by default but could return a label created through a result transformer.

Activity

Show:

Hardy FerentschikJune 3, 2015 at 7:05 AM

+1 Something to map facet values to a label sounds like a good idea.

Details

Assignee

Reporter

Components

Priority

Created June 2, 2015 at 5:05 PM
Updated September 25, 2023 at 2:48 PM