On Wed, Nov 30, 2016 at 1:36 PM, win harrington <win_harring...@yahoo.com.invalid> wrote: > I have jpeg files with latitude and longitudein separate fields. When I run > the post tool,it stores the lat/lon in separate fields. > For geospatial search, Solr wants themcombined into one field with the > format'latitude,longitude'. > How can I combine lat+lon into one field? >
Build the field up using the UpdateRequestProcessorChain, something like this: <!-- Build composite latitude-longitude --> <updateRequestProcessorChain name="composite-latlon"> <processor class="solr.CloneFieldUpdateProcessorFactory"> <str name="source">latitude</str> <str name="dest">latlon</str> </processor> <processor class="solr.CloneFieldUpdateProcessorFactory"> <str name="source">longitude</str> <str name="dest">latlon</str> </processor> <processor class="solr.ConcatFieldUpdateProcessorFactory"> <str name="fieldName">latlon</str> <str name="delimiter">,</str> </processor> <processor class="solr.LogUpdateProcessorFactory"/> <processor class="solr.RunUpdateProcessorFactory"/> </updateRequestProcessorChain> <requestHandler name="/update" class="solr.UpdateRequestHandler"> <lst name="defaults"> <str name="update.chain">composite-latlon</str> </lst> </requestHandler> Cheers Tom