4

我有这个架构:

<fields>
    <field name="id" type="sint" indexed="true" stored="true"/>
    <field name="title" type="text" indexed="true" stored="true"/>
    <field name="description" type="text" indexed="true" stored="true"/>
</field>

当我尝试推送 id = 6661883440 的新文档时,我收到此错误:

严重:org.apache.solr.common.SolrException:错误:[doc=6661883440] 添加字段 'id'='6661883440' 时出错

原因:org.apache.solr.common.SolrException:从值 '6661883440' 创建字段 'id{type=sint,properties=indexed,stored,omitNorms,sortMissingLast, required=true}' 时出错

引起:java.lang.NumberFormatException:对于输入字符串:“6661883440”

sint 类型字段有一些限制吗?有什么建议吗?

谢谢

4

1 回答 1

8

Solr 中的int字段是A numeric field that can contain 32-bit signed two's complement integer values.

Min Value Allowed: -2147483648
Max Value Allowed: 2147483647

使用LongA numeric field that can contain 64-bit signed two's complement integer values.

Min Value Allowed: -9223372036854775808
Max Value Allowed: 9223372036854775807
于 2013-05-22T10:49:36.627 回答