在 Solr 5.1.0 中,是否可以通过 REST schema api 设置唯一键?
我使用数据驱动架构创建了一个集合。
Solr 会猜测字段类型并根据我上传的数据创建字段。
我仍然可以通过发送 POST 请求来预先定义字段,例如
curl -X POST -H 'Content-type:application/json' --data-binary
'{
"add-field":{"name":"ID","type":"strings","stored":true }}' host:port/solr/test/schema
但我想知道是否有办法将其定义为唯一键。
尝试添加“uniqueKey”:true但失败
最佳答案
不,目前还不可能。它是一个开放的功能请求。 https://issues.apache.org/jira/browse/SOLR-7242
关于 Solr 5.1.0 : How to set the unique key via Schema API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30851331/