Spatial enhancements for Solr on Docker
This image enhance Solr with the JTS Topology Suite
Note: prior to Solr 6, the
org.locationtech.spatial4j part was
com.spatial4j.core and there used to be no convenience
JTS alias. Take a look at
this page for further information
Configure your schema
<?xml version="1.0" encoding="UTF-8" ?> <schema name="my-schema" version="1.6"> <!-- other fieldType declarations --> <fieldType name="location_rpt" geo="true" class="solr.SpatialRecursivePrefixTreeFieldType" distanceUnits="degrees" spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory" /> <!-- other field configurations --> <field name="geom" type="location_rpt" indexed="false" stored="true" required="false"/> <!-- values for indexed, stored and required are just an example... --> </schema>
schema.xml is just an example. The important line is the one with
Please take a look at the official docker image of Solr for any additional information. This is the base for this image.
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.