[jira] [Created] (SOLR-2663) Refactor FieldTypePluginLoader out of IndexSchema

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (SOLR-2663) Refactor FieldTypePluginLoader out of IndexSchema

Michael Gibney (Jira)
Refactor FieldTypePluginLoader out of IndexSchema
-------------------------------------------------

                 Key: SOLR-2663
                 URL: https://issues.apache.org/jira/browse/SOLR-2663
             Project: Solr
          Issue Type: Improvement
            Reporter: Hoss Man
            Assignee: Hoss Man


I have a use case where i'd like to be able to programmaticly "test" if a (single) arbitrary FieldType configuration is valid, but this is currently impossibly because the code to parse/init FieldTypes is buried deep inside IndexSchema.readSchema using anonymous inner-subclasses of AbstractPluginLoader.

I'd like to refactor this out into a concrete public class.  Regardless of my usecase, i think this is a good idea in general since it makes IndexSchema a lot easier to read/maintain and helps make it more obvious exactly what info is being used when initializing the FieldTypes+Analyzers

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (SOLR-2663) Refactor FieldTypePluginLoader out of IndexSchema

Michael Gibney (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2663:
---------------------------

    Attachment: SOLR_2663.patch

patch that refactors a big chunkc of IndexSchema.readSchema into a new public FieldTypePluginLoader.

This patch also adds a new public getDefaultLuceneMatchVersion() to IndexSchema (which seems like it should have been added a while ago) and converts the existing private IndexSchema.readSimilarity method into a package protected static method since it's used both for hte global default and for per field similarity (i thought about making it public, but it wasn't entirely obvious that it's something we really want to advertise)


> Refactor FieldTypePluginLoader out of IndexSchema
> -------------------------------------------------
>
>                 Key: SOLR-2663
>                 URL: https://issues.apache.org/jira/browse/SOLR-2663
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: SOLR_2663.patch
>
>
> I have a use case where i'd like to be able to programmaticly "test" if a (single) arbitrary FieldType configuration is valid, but this is currently impossibly because the code to parse/init FieldTypes is buried deep inside IndexSchema.readSchema using anonymous inner-subclasses of AbstractPluginLoader.
> I'd like to refactor this out into a concrete public class.  Regardless of my usecase, i think this is a good idea in general since it makes IndexSchema a lot easier to read/maintain and helps make it more obvious exactly what info is being used when initializing the FieldTypes+Analyzers

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-2663) Refactor FieldTypePluginLoader out of IndexSchema

Michael Gibney (Jira)
In reply to this post by Michael Gibney (Jira)

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

Robert Muir commented on SOLR-2663:
-----------------------------------

{quote}
Regardless of my usecase, i think this is a good idea in general since it makes IndexSchema a lot easier to read/maintain and helps make it more obvious exactly what info is being used when initializing the FieldTypes+Analyzers
{quote}

+1, I find it hard to navigate this class, I think it helps to split it up.

> Refactor FieldTypePluginLoader out of IndexSchema
> -------------------------------------------------
>
>                 Key: SOLR-2663
>                 URL: https://issues.apache.org/jira/browse/SOLR-2663
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: SOLR_2663.patch
>
>
> I have a use case where i'd like to be able to programmaticly "test" if a (single) arbitrary FieldType configuration is valid, but this is currently impossibly because the code to parse/init FieldTypes is buried deep inside IndexSchema.readSchema using anonymous inner-subclasses of AbstractPluginLoader.
> I'd like to refactor this out into a concrete public class.  Regardless of my usecase, i think this is a good idea in general since it makes IndexSchema a lot easier to read/maintain and helps make it more obvious exactly what info is being used when initializing the FieldTypes+Analyzers

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (SOLR-2663) Refactor FieldTypePluginLoader out of IndexSchema

Michael Gibney (Jira)
In reply to this post by Michael Gibney (Jira)

     [ https://issues.apache.org/jira/browse/SOLR-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2663.
----------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

Committed revision 1148494.


> Refactor FieldTypePluginLoader out of IndexSchema
> -------------------------------------------------
>
>                 Key: SOLR-2663
>                 URL: https://issues.apache.org/jira/browse/SOLR-2663
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>             Fix For: 4.0
>
>         Attachments: SOLR_2663.patch
>
>
> I have a use case where i'd like to be able to programmaticly "test" if a (single) arbitrary FieldType configuration is valid, but this is currently impossibly because the code to parse/init FieldTypes is buried deep inside IndexSchema.readSchema using anonymous inner-subclasses of AbstractPluginLoader.
> I'd like to refactor this out into a concrete public class.  Regardless of my usecase, i think this is a good idea in general since it makes IndexSchema a lot easier to read/maintain and helps make it more obvious exactly what info is being used when initializing the FieldTypes+Analyzers

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]