Solr 'Invalid Date String' Exception

前端 未结 1 1679
既然无缘
既然无缘 2021-01-01 16:30

I\'m new to Solr. I successfully indexed some data, but after passing a date attribute to an appropriate solr field I\'m receiving an exception:

I\'m passing the Str

1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 16:54

    According to the Solr DateField documentation, this format is required:

    date field shall be of the form 1995-12-31T23:59:59Z The trailing "Z" designates UTC time and is mandatory (See below for an explanation of UTC). Optional fractional seconds are allowed, as long as they do not end in a trailing 0 (but any precision beyond milliseconds will be ignored). All other parts are mandatory.

    The only option is to transform the date prior to sending it into Solr. If you are using DataImportHandler, it would be possible within that context/process.

    0 讨论(0)
提交回复
热议问题