lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: insert lat/lon from jpeg into solr
Date Thu, 01 Dec 2016 12:30:12 GMT
On Wed, Nov 30, 2016 at 1:36 PM, win harrington
<> 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 class="solr.CloneFieldUpdateProcessorFactory">
      <str name="source">longitude</str>
      <str name="dest">latlon</str>
    <processor class="solr.ConcatFieldUpdateProcessorFactory">
      <str name="fieldName">latlon</str>
      <str name="delimiter">,</str>
    <processor class="solr.LogUpdateProcessorFactory"/>
    <processor class="solr.RunUpdateProcessorFactory"/>

  <requestHandler name="/update" class="solr.UpdateRequestHandler">
    <lst name="defaults">
      <str name="update.chain">composite-latlon</str>



View raw message