http://yonik.com/solr/atomic-updates/

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":},
"cat_ss" : {"add":"Cyberpunk"}
}
]

Solr atomic update JSON方式的更多相关文章

  1. JSON方式提交文档时SOLR报:AtomicUpdateDocumentMerger Unknown operation for the an atomic update, operation ignored

    文档是数组转成的json 原数组: array( 0 =>3, 1 =>3, 2 =>4, 3 =>5, 4 =>5, 5 =>6) 用array_unique去掉 ...

  2. 向Solr数据集提交Json格式数据(Scala,Post)

    import scalaj.http.Http class SolrAdd () {// 方法接受两个参数,dataType为数据集名称,jsonString为数据json字符串 def postTo ...

  3. json方式封装接口通信

    编写response类: <?php class response{ /** * 按json方式输出通信数据 * @param integer $code 状态码 * @param string ...

  4. json方式的面向对象

    json方式只适合于一个对象. var p1 = { name:"香菇", sex :"女", dreamdu: { URL: "www.dreamd ...

  5. App接口中json方式封装通信接口

    封装json通信接口的类 <?php class Response{ /** * 按json方式输出通信数据 * @param integer $code状态码 * @param string ...

  6. PHP 开发 APP 接口 学习笔记与总结 - JSON 方式封装通信接口

    1.通信数据的标准格式 ( JSON ),包括: code:状态码(200,400等) message:提示信息(例如:数据返回成功.邮箱格式错误等) data:返回数据 2.JSON 方式封装通信接 ...

  7. Android+struts2+JSON方式的手机开发(Login)

    在手机的后台服务无论是调用WebService还是Http请求,多数都是采用Android的HttpClient实现相关的调用实现.本文实现Android+Struts2+JSON方式实现为手机前台提 ...

  8. JQuery和JSON方式参数传递并处理JAVAWEB中文乱码问题

    本文主要讲springMVC中视图和控制器之间常用的两种传递参数的方式: 1.JQuery 2.JSON 一.JQuery方式 思路:单击按钮后,触发JQuery事件,而提交整个表单 JSP中 < ...

  9. Jquery发送ajax请求以及datatype参数为text/JSON方式

    Jquery发送ajax请求以及datatype参数为text/JSON方式 1.方式一:datatype:'text' 2.方式二:datatype:'JSON' 3.使用gson-1.5.jar包 ...

随机推荐

  1. Ubuntu 汉化时ubuntu software database is broken错误解决

    关于Ubuntu 汉化时的错误解决:按照网上的方法没有解决 最后 删掉thunderbird mail .这个软件,顺利解决!! 错误:thunderbird-locale-en: Depends: ...

  2. Error : An error occurred while creating the WebJob schedule: Response status code does not indicate success: 409 (Conflict).

    How to fix the error? the answer is simple switch from Free to Standard...

  3. (转)HTTP 长连接和短连接

    1. HTTP协议与TCP/IP协议的关系 HTTP的长连接和短连接本质上是TCP长连接和短连接.HTTP属于应用层协议,在传输层使用TCP协议,在网络层使用IP协议.IP协议主要解决网络路由和寻址问 ...

  4. LoadRunner连接Genymotion

  5. Android Animation(动画)

    前言 Android 平台提供实现动画的解决方案(三种) 一.3.0以前,android支持两种动画: (1)Frame Animation:顺序播放事先做好的图像,与gif图片原理类似,是一种逐帧动 ...

  6. iframe载入页面过程显示动画效果

    http://www.xfeixiang.com/Bug/Detail/A2FD7EFFA8CA72F1

  7. AngularJs的UI组件ui-Bootstrap

    http://www.cnblogs.com/pilixiami/p/5597634.html

  8. 学习笔记:MySQL列属性

    列属性 a)         null|not null 缺省值是null,也就是允许为空,如果是not null而又没有给该字段赋值的话,系统会首先查询该字段有没有默认值 b)         de ...

  9. hadoop的自定义数据类型和与关系型数据库交互

    最近有一个需求就是在建模的时候,有少部分数据是postgres的,只能读取postgres里面的数据到hadoop里面进行建模测试,而不能导出数据到hdfs上去. 读取postgres里面的数据库有两 ...

  10. JSON.stringify()

    概述 JSON.stringify() 方法可以将任意的 JavaScript 值序列化成 JSON 字符串. 语法 JSON.stringify(value[, replacer [, space] ...