You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by maguba <ma...@gmail.com> on 2019/06/17 14:13:50 UTC
Error in last_modified for open documents formats
Hello,
I install solr 8.1.1 and when I trying indexing libreoffice files (ods,
odt,...) throws:
org.apache.solr.common.SolrException: ERROR:
[doc=D42039220124097949-A100020965] Error adding field
'last_modified'='2019-06-14T16:59:47.610000000' msg=Invalid Date
String:'2019-06-14T16:59:47.610000000'
Caused by: org.apache.solr.common.SolrException: Invalid Date
String:'2019-06-14T16:59:47.610000000'
at org.apache.solr.util.DateMathParser.parseMath(DateMathParser.java:247)
at org.apache.solr.util.DateMathParser.parseMath(DateMathParser.java:226)
at
org.apache.solr.schema.DatePointField.createField(DatePointField.java:214)
at org.apache.solr.schema.PointField.createFields(PointField.java:250)
at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:65)
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:171)
... 58 more
Others document formats (pdf, doc, xls,...) works without problem.
schema.xml definition:
<field name="last_modified" type="date" indexed="true" stored="true"/>
...
<fieldType name="date" class="solr.DatePointField" docValues="true"/>
Please, any idea?
Thanks!
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Error in last_modified for open documents formats
Posted by Erick Erickson <er...@gmail.com>.
Solr requires a very precise format, the one you’re sending has both
too many zeros to the right of the decimal point and is missing the
terminating ‘Z’. See: https://lucene.apache.org/solr/guide/6_6/working-with-dates.html
The output you’re getting is from Tika, which is used by Solr.
You’ll have to find a way to transform it into a proper Solr date format.
One option is to use the ParseDateFieldUpdateProcessorFactory on
the Solr side if you can’t correct it otherwise, see:
https://lucene.apache.org/solr/guide/7_7/schemaless-mode.html
NOTE: You do _not_ have to use schemaless mode to use this, you
that link is just to show you how to configure it. You’ll just have
to configure it as part of your standard update chain in solrconfig.xml
Best,
Erick
> On Jun 17, 2019, at 7:13 AM, maguba <ma...@gmail.com> wrote:
>
> Hello,
>
> I install solr 8.1.1 and when I trying indexing libreoffice files (ods,
> odt,...) throws:
>
> org.apache.solr.common.SolrException: ERROR:
> [doc=D42039220124097949-A100020965] Error adding field
> 'last_modified'='2019-06-14T16:59:47.610000000' msg=Invalid Date
> String:'2019-06-14T16:59:47.610000000'
>
> Caused by: org.apache.solr.common.SolrException: Invalid Date
> String:'2019-06-14T16:59:47.610000000'
> at org.apache.solr.util.DateMathParser.parseMath(DateMathParser.java:247)
> at org.apache.solr.util.DateMathParser.parseMath(DateMathParser.java:226)
> at
> org.apache.solr.schema.DatePointField.createField(DatePointField.java:214)
> at org.apache.solr.schema.PointField.createFields(PointField.java:250)
> at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:65)
> at
> org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:171)
> ... 58 more
>
> Others document formats (pdf, doc, xls,...) works without problem.
>
> schema.xml definition:
>
> <field name="last_modified" type="date" indexed="true" stored="true"/>
> ...
> <fieldType name="date" class="solr.DatePointField" docValues="true"/>
>
> Please, any idea?
>
> Thanks!
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html