solrj api for partial document update

心不动则不痛 提交于 2019-11-27 11:56:15

As it turns out, the code snippet shown above in the question actually works. I don't know what was wrong the first time I tried it, perhaps I simply forgot to commit or my schema was misconfigured.

In any case, this question is very localized. However, since the api with the hash map is so poorly documented, I thought maybe it is worth to keep this question and answer.

The key of the hash map can be one of three values:

  • set - to set a field.
  • add - to add to a multi-valued field.
  • inc - to increment a field.

There is an example of this code in the solrj unit tests, in a method called testUpdateField.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!