[ 
https://issues.apache.org/jira/browse/SOLR-759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645095#action_12645095
 ] 

Yonik Seeley commented on SOLR-759:
-----------------------------------

I agree it's non-optimal, but I don't see a good way to improve things w/o 
slowing things down.
That DateField is currently indexed in string form w/o the Z (so it sorts 
correctly).  The only formatting currently done is to add back the Z.  So there 
really isn't any date object to pass to the Writer (and it would be more 
wasteful to parse it into a Date object just to serialize it again).

> DateField already formats the date as a string before sending it to the writer
> ------------------------------------------------------------------------------
>
>                 Key: SOLR-759
>                 URL: https://issues.apache.org/jira/browse/SOLR-759
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Stephane Bailliez
>            Priority: Minor
>
>   public void write(XMLWriter xmlWriter, String name, Fieldable f) throws 
> IOException {
>     xmlWriter.writeDate(name, toExternal(f));
>   }
>   public void write(TextResponseWriter writer, String name, Fieldable f) 
> throws IOException {
>     writer.writeDate(name, toExternal(f));
>   }
> The above calls the method on the writer that takes a string as a value. For 
> makes the formatting logic in the response writer irrelevant and is 
> inefficient in case you need to format the date differently in a custom 
> writer (you need to parse again the date into a date object that format it 
> again)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to