It's been my experience that using they convenient feature to change the output 
key still doesn't save you from having to map it back to the field name 
underlying it in order to trigger the filter query.  With that in mind it just 
makes more sense to me to leave the effort in the View portion of the design.  

On Aug 12, 2013, at 6:34 AM, Peter Sturge <peter.stu...@gmail.com> wrote:

> 2c worth,
> We do lots of facet lookups to allow 'prettyprint' versions of facet names.
> We do this on the client-side, though. The reason is then the lookups can
> be different for different locations/users etc. - makes it easy for
> localization.
> It's also very easy to implement such a lookup, without having to disturb
> the innards of Solr...
> 
> 
> 
> On Mon, Aug 12, 2013 at 2:25 PM, Erick Erickson 
> <erickerick...@gmail.com>wrote:
> 
>> Have you seen the "key" parameter here:
>> 
>> http://wiki.apache.org/solr/SimpleFacetParameters#key_:_Changing_the_output_key
>> 
>> it allows you to label the output key anything you want, and since these
>> are
>> field names, this seems to-able.
>> 
>> Best,
>> Erick
>> 
>> 
>> On Mon, Aug 12, 2013 at 4:02 AM, Aleksander Akerø <aleksan...@gurusoft.no
>>> wrote:
>> 
>>> Hi
>>> 
>>> I wondered if there was some way to configure a display name for facet
>>> fields. Either that or some way to display nordic letters without it
>>> messing up the faceting.
>>> 
>>> Say I wanted a facet field called "område" (norwegian, "area" in
>> english).
>>> Then I would have to create the field something like this in schema.xml:
>>> 
>>> <field name="omrade" type="string" indexed="true" stored="true"
>>> required="false" />
>>> 
>>> But then I would have to do a replace to show a "prettier" name in
>>> frontend. It would be preferred not to do this sort of hardcoding, as I
>>> would have to do this for all the facet fields.
>>> 
>>> 
>>> Either that or I could try encoding the 'å' like this:
>>> 
>>> <field name="omr&#229;de" type="string" indexed="true" stored="true"
>>> required="false" />
>>> 
>>> Then it will show up with a pretty name, but the faceting will fail.
>> Maybe
>>> this is due to encoding issues, seen as the frontend is encoded with
>>> ISO-8859-1?
>>> 
>>> 
>>> So does anyone have a good practice for either getting this sort of
>> problem
>>> working properly. Or a way to define an alternative "display name" for a
>>> facet field, that I could display instead of the field.name?
>>> 
>>> 
>>> *Aleksander Akerø*
>>> Systemkonsulent
>>> Mobil: 944 89 054
>>> E-post: aleksan...@gurusoft.no
>>> 
>>> *Gurusoft AS*
>>> Telefon: 92 44 09 99
>>> Østre Kullerød
>>> www.gurusoft.no
>>> 
>> 

Reply via email to