Bar Rotstein commented on SOLR-12591:

There is another small detail that I am not sure about.
In DateExtractionUtil the date is added to the document with type Instance, 
while the URP adds the date as a Date type.
The toString() method in each type slightly differ.
Is it OK to save the parsed fields as a Date, even though the XML return by 
them is different?
Perhaps this could be addressed in 
[SOLR-12593|https://issues.apache.org/jira/browse/SOLR-12593], where we could 
use the .toInstant() method of the Date object in some way,
to mimic the behavior found in SolrContentLoader?
Instant date = ExtractionDateUtil.parseDate(val, dateFormats); // may throw
result = date.toString();//ISO format

> Ensure ParseDateFieldUpdateProcessorFactory can be used instead of 
> ExtractionDateUtil
> -------------------------------------------------------------------------------------
>                 Key: SOLR-12591
>                 URL: https://issues.apache.org/jira/browse/SOLR-12591
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: master (8.0)
> ParseDateFieldUpdateProcessorFactory should ideally be able to handle the 
> cases that ExtractionDateUtil does in the "extraction" contrib module.  Tests 
> should be added, ported from patches in SOLR-12561 that enhance 
> TestExtractionDateUtil to similarly ensure the URP is tested.  I think in 
> this issue, I should switch out Joda time for java.time as well (though leave 
> the complete removal for SOLR-12586) if it any changes are actually necessary 
> – they probably will be.
> Once this issue is complete, it should be appropriate to gut date time 
> parsing out of the "extraction" contrib module – a separate issue. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to