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

Chris A. Mattmann commented on SOLR-1688:
-----------------------------------------

bq. Chris, isn't referring to it as a ValueSource instance enough for 
SOLR-1586? 

Unfortunately, no. Grant's last patch for SOLR-1586 created a StrFieldSource, 
which isn't visible outside of its class.

bq. That is not really a problem. The field types are always loaded by Solr so 
whether they are an inner class or independent does not matter too much.

It's not a problem as much as it is inconsistent. Some FieldCacheSources are 
defined inline in their associated FieldType class, some are defined outside of 
it, for no rhyme or reason. This patch makes them all consistently defined in 
their own separate class, making it easier for extension, use and inheritance.

> Inner class FieldCacheSources should be refactored into their own classes
> -------------------------------------------------------------------------
>
>                 Key: SOLR-1688
>                 URL: https://issues.apache.org/jira/browse/SOLR-1688
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.4
>         Environment: indep. of env.
>            Reporter: Chris A. Mattmann
>             Fix For: 1.5
>
>         Attachments: SOLR-1688.Mattmann.122609.patch.txt
>
>
> While working on SOLR-1586 I noticed that outside of class level access (or 
> package level), you can't really reference FieldCacheSources that are defined 
> inside of their FieldType constituents (e.g., in the case of StrFieldSource 
> as defined in StrField). What's more troubling is that the 
> FieldType/FieldCacheSources are defined in an inconsistent fashion: some are 
> done as inner classes, e.g., StrFieldSource and SortableFloatFieldSource, 
> while others are defined as individual classes (e.g., FloatFIeldSource). This 
> patch will make them all consistent and define each FieldCacheSource as an 
> outside class, present in o.a.solr.search.function.

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