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

Andrzej Bialecki  commented on SOLR-398:
----------------------------------------

Great minds think alike :) I was about to submit exactly the same patch when I 
noticed this JIRA.

One thing is missing in your patch - DocumentBuilder:282 should use 
"out.getFieldable()" instead of "out.getField()". This is required if you 
provide a custom Fieldable implementation (!instanceof o.a.l.d.Field) in 
FieldType subclasses, because o.a.l.d.Document.getField tries to cast the 
result to o.a.l.d.Field, whereas Document.getFieldable is happy with any 
subclass of Fieldable ;)

> Widen return type of FiledType.createField to Fieldable in order to maximize 
> flexibility
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-398
>                 URL: https://issues.apache.org/jira/browse/SOLR-398
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>    Affects Versions: 1.2, 1.3
>            Reporter: Espen Amble Kolstad
>            Priority: Minor
>         Attachments: 1.2-FieldType-2.patch, trunk-FieldType-3.patch, 
> trunk-FieldType-4.patch
>
>
> FieldType.createField currently returns Field.
> In order to maximize flexibility for developers to extend Solr, it should 
> return Fieldable.

-- 
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