问题描述如标题。

异常信息如下:

Result
Caused by: org.apache.solr.common.SolrException: Invalid Date String:'Mon Sep 14 01:48:38 CEST 2015'
at org.apache.solr.util.DateFormatUtil.parseMath(DateFormatUtil.java:)

对应开源问题单:

https://issues.apache.org/jira/browse/SOLR-8050

solr5.4 solr6.0版本修复了该问题。而cloudera的社区版还存在该问题。

规避思路:虽然日期字段不支持部分更新,可以先转换为string字段,再通过copyField到日期字段。

<!--customer_doc-->
<field name="phone_in_history_date_china_str" type="string" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="phone_out_history_date_china_str" type="string" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="caller_history_date_china_str" type="string" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="history_record_date_china_str" type="string" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="phone_in_history_date_china" type="tdate" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="phone_out_history_date_china" type="tdate" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="caller_history_date_china" type="tdate" indexed="false" stored="true" multiValued="true" docValues="true"/>
<field name="history_record_date_china" type="tdate" indexed="false" stored="true" multiValued="true" docValues="true"/>

copyField:

<copyField source="phone_in_history_date_china_str" dest="phone_in_history_date_china"/>
<copyField source="phone_out_history_date_china_str" dest="phone_out_history_date_china"/>
<copyField source="caller_history_date_china_str" dest="caller_history_date_china"/>
<copyField source="history_record_date_china_str" dest="history_record_date_china"/>

Solr部分更新MultiValued的Date日期字段时报错及解决方案的更多相关文章

  1. Solr部分更新MultiValued的Date日期字段时报错及解决方案:Invalid Date String:'Mon Sep 14 01:48:38 CST 2015'

    问题描述如标题. 异常信息如下: Result Caused by: org.apache.solr.common.SolrException: Invalid Date String:'Mon Se ...

  2. sql server中NULL导入decimal字段时报错

    sql server中NULL导入decimal字段时报错 在导入CSV文件时,如果decimal字段为null值,导致文本文件入库时失败. 错误现象 构造例子 新建一张表,包含decimal字段. ...

  3. OverflowError:django signed integer is greater than maximum 数据库日期字段相关错

    使用django中的默认数据库sqlite3, 在pycharm中录入日期字段相关信息结果出现问题 在保存的时候如图 直接在界面选择的日期变成了时间戳, 并且在获取数据的时候报错 经过查询之后(舔大佬 ...

  4. struts2 谷歌浏览器保存date类型数据时报错

    一同事发现一个bug,在chrome上保存一个表单时,后台会报错,而在firefox上则可以正常保存. 奇怪的地方在于,后端的程序是同一个,而在浏览器上查看请求header时,两个浏览器对应的字段内容 ...

  5. SpringMVC解决@ResponseBody返回Json的Date日期类型的转换问题

    在做项目的时候,发现后台把Date类型的属性以json字符串的形式返回,前台拿不到转换后的日期格式,始终响应回去的都是long类型时间戳. 查阅资料之后找到解决方法: 方法一(在springmvc的x ...

  6. mysql更新表中日期字段时间

    DATE_ADD和DATE_SUB函数可以用INTERVAL关键字标识的时间间隔进行加减操作,类似于PHP中的strtotime函数. 1.更新表中有效期valid_time字段值都增加一天 UPDA ...

  7. 如何使用 t-sql 更新数据库中日期字段的部分数据(年?月?日?时?分?秒?)

    嗯,从网上找到了一些内容,综合利用了sql server的一些内置方法 首先是 convert 方法:https://msdn.microsoft.com/zh-cn/library/ms187928 ...

  8. ORACLE中date类型字段的处理

    (1)在英文版本的ORACLE中默认日期格式为'DD-MON-YY',例如'01-JAN-98' 在汉化的中文版本中ORACLE默认日期格式为'日-月-年',例如'21-8月-2003'或'21-8月 ...

  9. Oracle查询日期字段是否包含时分秒 TRUNC() 函数

    可以使用 ORACLE TRUNC()函数 来进行判断 表 A 日期字段 datetime 部分数据带时分秒,部分数据没有时分秒 select * from A where datetime = TR ...

随机推荐

  1. 自己动手丰衣足食之 jQuery 数量加减插件

    引言 做一个手机端的订单相关项目中,其中下订单时需要用到数量加减的控件,可以设置默认值,也可以设置最大值和最小值.使用jQuery这么长时间了,平时很少去编写属于自己的插件,现在编写的时候对立面的一些 ...

  2. ztree + ashx +DataTable +Oracle

    问题描述 好久没有使用ztree了,刚才在使用ztree做导航时遇到了几个小问题: 1.返回数据源是undefined . 2.数据出现后树结构没有出现(pIdKey单词拼写错误). 3.在使用Ora ...

  3. 【JUC】JDK1.8源码分析之LinkedBlockingQueue(四)

    一.前言 分析完了ArrayBlockingQueue后,接着分析LinkedBlockingQueue,与ArrayBlockingQueue不相同,LinkedBlockingQueue底层采用的 ...

  4. sqlite - java 初学

    进来准备使用一种embedded database,即嵌入式数据库,方便随项目本地存储.目前学习打算是sqlite和H2. document:http://www.runoob.com/sqlite/ ...

  5. MongoDB初学

    参考:MongoDB 教程 | 菜鸟教程 安装 1.下载安装,从官网下载winows安装包,安装到d盘(注意路径) 2.由于我安装在d盘,所以在d盘创建文件夹data,里面创建db文件夹 3.启动方法 ...

  6. jQuery-1.9.1源码分析系列(十) 事件系统——主动触发事件和模拟冒泡处理

    发现一个小点,先前没有注意的 stopPropagation: function() { var e = this.originalEvent; ... if ( e.stopPropagation ...

  7. 让我们一起用开源数据库和开源框架废弃Access

    一.为什么要废弃Access? 1.客户的机子上需要安装access的驱动 ps:这个比较烦人,大家都知道部署越简单越好,安装这个对用户来说太繁琐了. 2.操作时性能不佳 using System; ...

  8. asp.net留言板项目源代码下载

    HoverTree是一个asp.net开源项目,实现了留言板功能. 前台体验网址:http://hovertree.com/guestbook/ 后台请下载源代码安装. 默认用户名:keleyi 默认 ...

  9. Redis命令拾遗四——集合类型(命令补充)

    补充下上篇文章集合的命令. 上篇地址 博客园蜗牛 http://www.cnblogs.com/tdws/p/5785939.html SCARD Key获得执行集合中元素的数量. SDIFFSTOR ...

  10. C++面试题汇集

    1.在C++ 程序中调用被C 编译器编译后的函数,为什么要加extern “C”?答:首先,extern是C/C++语言中表明函数和全局变量作用范围的关键字,该关键字告诉编译器,其声明的函数和变量可以 ...