我在solr 4.2中使用了以下字段类型&它工作得很好。
<field name="latlong" type="location_rpt" indexed="true" stored="true" required="false" multiValued="false" />
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
distErrPct="0.025"
maxDistErr="0.000009"
units="degrees"
/>
但是,当我将solr升级到solr 4.7.1时,它在发布新文档时报告了以下错误:
Caused by: com.spatial4j.core.exception.InvalidShapeException: java.lang.NumberFormatException: For input string: "78.42968,30.73333,78.45"
at org.apache.solr.util.SpatialUtils.parsePoint(SpatialUtils.java:68)
at org.apache.solr.util.SpatialUtils.parsePointSolrException(SpatialUtils.java:84)
... 45 more
原因: java.lang.NumberFormatException:对于输入字符串:"78.42968,30.73333,78.45“
我正在将以下文档值过帐到solr。
<field name='latlong'><![CDATA[30.9308,78.42968,30.73333,78.45]]></field>
发布于 2014-05-21 08:04:42
字符串中有3个值。如果我正确地阅读了文档,它将只期望x,y
。
https://stackoverflow.com/questions/23777382
复制相似问题