Hello,

I have two fields TOWN and POSTALCODE and I want to concat those two in one
field to do faceting

My two fields  are declared as followed:

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

The concat field is declared as followed:

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

and I do the copyfield as followed:

   <copyField source="TOWN" dest="TOWN_POSTALCODE"/>
   <copyField source="POSTALCODE" dest="TOWN_POSTALCODE"/>


When I do faceting on TOWN_POSTALCODE field, I only get answers like

<lst name="TOWN_POSTALCODE">
<int name="62200">5</int>
<int name="62280">5</int>
<int name="boulogne sur mer">5</int>
<int name="saint martin boulogne">5</int>
...

Which means the faceting is down on the TOWN part or the POSTALCODE part of
TOWN_POSTALCODE.

But I would like to have answers like

<lst name="TOWN_POSTALCODE">
<int name="boulogne sur mer 62200">5</int>
<int name="paris 75016">5</int>

Is this possible with Solr?

Thanks,
Elisabeth

Reply via email to