我剛安裝了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