我刚安装了Solr6.6.0。在CentOS上,并使用提供的示例“sample_techproducts_configs”进行工作。我能够索引文件,但只要我给它一个图像文件,我就会收到关于无效日期的异常。 Solr细胞从EXIF中提取一个日期,然后似乎无法将其传递给Solr。 我用下面的图像文件:Solr Cell无法用EXIF索引图像文件
http://www.imagemagick.org/Usage/photos/pagoda_sm.jpg
和从Solr的响应是:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">114</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">org.apache.solr.common.SolrException</str></lst><str name="msg">Invalid Date String:'2005-07-09T14:05:15'</str><int name="code">400</int></lst>
</response>
它抱怨被格式化为yyyy-MM-dd'T'HH:mm:ss
的日期,这应该是根据默认日期格式:
https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Solr+Cell+using+Apache+Tika
我在找af ix或者至少是解决方法,所以它会跳过日期并仅从EXIF索引其他信息。
在您发布的教程中,我还发现可以配置'requestHandler'来定义几种支持的日期格式的提示。这似乎是对我来说最好的方法。 – TurbuLenz