You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by david fernandes <pd...@gmail.com> on 2014/12/18 19:29:56 UTC

Display name of a facet

Hi guys,

I have this field in my schema:

<field name="ds_orgao_julgador" type="string" indexed="true" stored="true"
/>

And I need to use this field as a facet but with a different display name,
it means that instead of to display ds_orgao_julgador I'd like to display
Órgão Julgador.

I tried this:

<str name="facet.field">{!key='Órgão
Julgador'}ds_orgao_julgador_colegiado</str>

but I got:

"ERROR 400 ERROR 400
undefined field Julgador"

I had already looked for in some books (apache cookbook, solr in action,
solr enterprise) and also in the mail list archive. The closest info that I
found was here (in this mail list)
http://lucene.472066.n3.nabble.com/solr-how-to-change-display-name-of-a-facet-td3960097.html

but it doesn't worked for me. Can anyone help me? Thanks

Cheers

Re: Display name of a facet

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
How would you solve this problem if it were a database? Internal field
names are not something that needs to be exposed directly to the user.
If you need to map them, map them in your client, since you are
hardcoding the field names anyway.

Regards,
   Alex.

----
Sign up for my Solr resources newsletter at http://www.solr-start.com/


On 18 December 2014 at 13:29, david fernandes <pd...@gmail.com> wrote:
> Hi guys,
>
> I have this field in my schema:
>
> <field name="ds_orgao_julgador" type="string" indexed="true" stored="true"
> />
>
> And I need to use this field as a facet but with a different display name,
> it means that instead of to display ds_orgao_julgador I'd like to display
> Órgão Julgador.
>
> I tried this:
>
> <str name="facet.field">{!key='Órgão
> Julgador'}ds_orgao_julgador_colegiado</str>
>
> but I got:
>
> "ERROR 400 ERROR 400
> undefined field Julgador"
>
> I had already looked for in some books (apache cookbook, solr in action,
> solr enterprise) and also in the mail list archive. The closest info that I
> found was here (in this mail list)
> http://lucene.472066.n3.nabble.com/solr-how-to-change-display-name-of-a-facet-td3960097.html
>
> but it doesn't worked for me. Can anyone help me? Thanks
>
> Cheers