我将使用http请求对solr进行原子更新。我想用id:"http://www.entekhab.ir"
设置view="true"
来更新文档我确实调用了这两个http请求,但它们都不适用于我。你能告诉我我做错了什么部分吗?
http://10.102.1.30:8983/solr/collection1/update?commit=true -H 'Content-Type:text/xml'
'<add>
<doc>
<field
name="id">http://www.entekhab.ir/</field>
<field update="set"
name=
"view">
true
</field>
</doc>
</add>'
http://10.102.1.30:8983/solr/collection1/update?commit=true -H 'Content-type:application/json' -d '[{"id":"http://www.entekhab.ir/","view":{"set":true}}]'
p.s:id字段是我的schema.xml中的唯一键