How can copy 2 fields data to one field on Solr

solr

Solution

Maybe is it outdated but you can use "updateRequestProcessorChain"

<updateRequestProcessorChain name="composite-position">
  <processor class="solr.CloneFieldUpdateProcessorFactory">
    <str name="source">lat</str>
    <str name="source">lng</str>
    <str name="dest">store</str>
  </processor>
  <processor class="solr.ConcatFieldUpdateProcessorFactory">
    <str name="fieldName">store</str>
    <str name="delimiter">;</str>
  </processor>
  <processor class="solr.LogUpdateProcessorFactory" />
  <processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

Problem

I have a document in solr with `Lat` and `Lng` fields. I need to add a new field called `store` containing data taken from both the `Lat` and `Lng`. I tried to use `copyField` field but I got the error: Field store is not multivalued and destination for multiple copyFields (2) Here is my configuration: ``` <fields> <field name="lat" type="sdouble" indexed="true" stored="true" required="true" multiValued="false" /> <field name="lng" type="sdouble" indexed="true" stored="true" required="true" multiValued="false" /> <field name="store" type="text" indexed="true" stored="true"/> </fields> <copyField source="lat" dest="store"/> <copyField source="lng" dest="store"/> ``` Is it possible to copy the content of two fields within the same destination field?

Original source

Related problems