Thanks for the information Shawn. It works when I remove the units parameter entirely.
Regards, Edwin On 25 May 2016 at 21:49, Shawn Heisey <apa...@elyograg.org> wrote: > On 5/25/2016 3:54 AM, Zheng Lin Edwin Yeo wrote: > > Thanks for your reply. I have found that the problem is with the > > units="degrees" in schema.xml Caused by: java.lang.RuntimeException: > > schema fieldtype > > location_rpt(org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType) > > invalid arguments:{units=degrees} at > > org.apache.solr.schema.FieldType.setArgs(FieldType.java:198) at > > > org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:150) > > at > > > org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:53) > > Prior to 5.0, the units parameter was *required* for that class, but > apparently didn't actually *do* anything. The parameter was deprecated > in 5.0, and removed in 6.0 (which errors because it's an unknown > parameter): > > https://issues.apache.org/jira/browse/SOLR-6797 > > This is the CHANGES.txt entry for that issue: > > * SOLR-6797: Spatial fields that used to require units=degrees like > SpatialRecursivePrefixTreeFieldType (RPT) now take > distanceUnits=degrees|kilometers|miles instead. It is applied to nearly > all distance measurements involving the field: maxDistErr, distErr, d, > geodist, score=distance|area|area2d. score now accepts these units as > well. It does NOT affect distances embedded in WKT strings like > BUFFER(POINT(200 10),0.2)). > (Ishan Chattopadhyaya, David Smiley) > > If you change "units" to "distanceUnits" in your schema, it might get > rid of the error. I think you could also just remove the units > parameter entirely. I have not tested either option, so I cannot be > absolutely sure what will happen. > > Thanks, > Shawn > >