Github user barrotsteindev commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/428#discussion_r207465468
--- Diff:
solr/core/src/java/org/apache/solr/update/processor/ParseDateFieldUpdateProcessorFactory.java
---
@@ -115,9 +123,10 @@ protected Object mutateValue(Object srcVal) {
for (Map.Entry<String,DateTimeFormatter> format :
formats.entrySet()) {
DateTimeFormatter parser = format.getValue();
try {
- DateTime dateTime = parser.parseDateTime(srcStringVal);
- return dateTime.withZone(DateTimeZone.UTC).toDate();
- } catch (IllegalArgumentException e) {
+ TemporalAccessor parsedTemporalDate =
parser.parseBest(srcStringVal, OffsetDateTime::from,
--- End diff --
IMO we should strive for better performance in URPs.
I had a look at your patch, and used it as a building block to make another
parsing method.
Perhaps we should have a more universal parsing method in a more global
scope to avoid code duplication.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]