lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jennifer Coston <>
Subject Need Help Resolving Unknown Shape Definition Error
Date Thu, 11 Aug 2016 20:04:16 GMT


I am trying to setup a local solr core so that I can perform Spatial
searches on it. I am using version 5.2.1. I have updated my schema.xml file
to include the location-rpt fieldType:

<fieldType name="location_rpt"
        geo="false" distErrPct="0.025" maxDistErr="0.001"
distanceUnits="degrees" />

And I have defined my field to use this type:

<field name="positionWkt" type="location_rpt" indexed="true"
stored="true" />

I also added the jts-1.4.0.jar file to C:\solr-5.2.1\server\solr-webapp

However when I try to add a document through the Solr Admin Console I am
seeing this response:

  "responseHeader": {
    "status": 400,
    "QTime": 6
  "error": {
    "msg": "Unknown Shape definition [POLYGON((-77.23 38.922, -77.23
38.923, -77.228 38.923, -77.228 38.922, -77.23 38.922))]",
    "code": 400

I can submit documents successfully if I remove the positionWkt field. Did
I miss a configuration step?

Here is the document I am trying to add:

        "observationId": "8e09f47f",
        "observationType": "image",
        "startTime": "2015-09-19T21:03:51Z",
        "endTime": "2015-09-19T21:03:51Z",
        "receiptTime": "2016-07-29T15:49:49.328Z",
        "locationLat": 38.9225015078814,
        "locationLon": -77.22900299194423,
        "position": "38.9225015078814,-77.22900299194423",
        "positionWkt": "POLYGON((-77.23 38.922, -77.23 38.923, -77.228
38.923, -77.228 38.922, -77.23 38.922))",
        "provider": "a"

Here are the fields I added to the schema.xml file (I started with the
template, please let me know if you need the whole thing):


<!-- MY FIELDS -->
<copyField source="observationId" dest="id"/>
<!-- 'id' field already defined above. no need to explicitly define again.
<field name="observationId" type="string" indexed="true" stored="true"
required="true" multiValued="false"/>
<field name="observationType" type="string" indexed="true" stored="true"/>
<field name="startTime" type="tdate" indexed="true" stored="true"/>
<field name="endTime" type="tdate" indexed="true" stored="true"/>
<field name="receiptTime" type="tdate" indexed="true" stored="true"/>
<field name="locationLat" type="tfloat" indexed="true" stored="true"/>
<field name="locationLon" type="tfloat" indexed="true" stored="true"/>
<field name="position" type="location" indexed="true" stored="true"/>
<field name="positionWkt" type="location_rpt" indexed="true"
stored="true" />

Thank you!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message