Solr atomic update JSON方式

发布时间:2017-6-23 13:09:13 编辑 分享查询网我要评论
本篇文章主要介绍了"Solr atomic update JSON方式 ",主要涉及到Solr atomic update JSON方式 方面的内容,对于Solr atomic update JSON方式 感兴趣的同学可以参考一下。

Solr supports several modifiers that atomically update values of a document.

  • set – set or replace a particular value, or remove the value if null is specified as the new value
  • add – adds an additional value to a list
  • remove – removes a value (or a list of values) from a list
  • removeregex – removes from a list that match the given Java regular expression
  • inc – increments a numeric value by a specific amount (use a negative value to decrement)

Note: All original source fields must be stored for field modifiers to work correctly.  This is the default in Solr.

[ {"id"         : "book1",  "author_s"   : {"set":"Neal Stephenson"},  "copies_i"   : {"inc":3},  "cat_ss"     : {"add":"Cyberpunk"} }

上一篇:个人理解c#对称加密 非对称加密 散列算法的应用场景