Solr更新的NumberFormatException

时间:2014-11-11 16:27:55

标签: java solr

在我的Solr索引上更新float字段 price 时,我收到了NumberFormatException。 schema.xml中的价格定义:

  

字段名称=“价格”type =“tfloat”indexed =“true”stored =“true”   required =“false”multiValued =“false”

这是我设置更新的方式:

Float newVal = 69.9f;
Map<String, Float> partialUpdatePrice = new HashMap<String, Float>();
partialUpdatePrice.put("set", newVal);
doc.addField("price", partialUpdatePrice);

将文档发送给Solr时,我在Solr日志中得到此异常:

  

java.lang.NumberFormatException:对于输入字符串:“{set = 69.9}”

由于

0 个答案:

没有答案
相关问题