[jira] [Created] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

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

[jira] [Created] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
David Smiley created LUCENE-4303:
------------------------------------

             Summary: Analysis factories should use ResourceLoader, not Class.forName
                 Key: LUCENE-4303
                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
             Project: Lucene - Core
          Issue Type: Bug
          Components: modules/analysis
            Reporter: David Smiley
            Assignee: David Smiley
            Priority: Minor


This affects SnowballPorterFilterFactory and PhoneticFilterFactory.

In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] [Assigned] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org

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

Uwe Schindler reassigned LUCENE-4303:
-------------------------------------

    Assignee: Uwe Schindler  (was: David Smiley)

This is easy to fix, I will take care!
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley commented on LUCENE-4303:
--------------------------------------

I'm already doing it Uwe! I'm almost done but there is an issue of initialization order that I need to fix since I assumed inform() is called first.
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] [Comment Edited] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley edited comment on LUCENE-4303 at 8/14/12 5:49 AM:
---------------------------------------------------------------

I'm already doing it Uwe!  That's why I assigned it to myself to signal it's being worked on. I'm almost done but there is an issue of initialization order that I need to fix since I assumed inform() is called first.
               
      was (Author: dsmiley):
    I'm already doing it Uwe! I'm almost done but there is an issue of initialization order that I need to fix since I assumed inform() is called first.
                 

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Uwe Schindler commented on LUCENE-4303:
---------------------------------------

OK, thanks. I just wanted to review the changes to be made, as I am currently working with Chris Male on LUCENE-4256, handling the complex init of analysis factories. The current impl is fine for Solr, but not for a universally useable factory environment, so needs changes. So I can review your patches before committing :-)
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] [Assigned] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley reassigned LUCENE-4303:
------------------------------------

    Assignee: David Smiley  (was: Uwe Schindler)
   

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley updated LUCENE-4303:
---------------------------------

    Attachment: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch

Attached is a patch that works.  Basically, the two affected factories were modified to support ResourceLoaderAware.  Their init() methods were transferred to inform() instead.

If you think it's good Uwe, I'll commit it.  Perhaps a CHANGES.txt is needed?
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Uwe Schindler commented on LUCENE-4303:
---------------------------------------

Patch looks fine, I dont like the newInstance().getClass(), but as quick fix this is fine. In my opinion, the getEncoder() should request the encoder from ReosurceLoader. But its also fine how it is implemented at the moment.

Some minor things: the inject field should have no access modifier, as test is in same package, so package-private is fine. Protected means access from subclasses, which is not the case.

The tests are also fine, ClassPathResourceLoader is fine here!
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley commented on LUCENE-4303:
--------------------------------------

I'll change the modifier for inject; I should know better.  RE  newInstance().getClass() -- yeah not great I know but it's less change and it's possible the resourceLoader's resolution might involve more overhead which would get triggered on every create(TokenStream) call so I went for this approach.

I'll commit soonish.
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Uwe Schindler commented on LUCENE-4303:
---------------------------------------

+1
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Uwe Schindler commented on LUCENE-4303:
---------------------------------------

Will you backport?
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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] (LUCENE-4303) Analysis factories should use ResourceLoader, not Class.forName

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

David Smiley resolved LUCENE-4303.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

Committed to 4x r1372648 & trunk r1372631.  Resolving issue.
               

> Analysis factories should use ResourceLoader, not Class.forName
> ---------------------------------------------------------------
>
>                 Key: LUCENE-4303
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4303
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-4303_Use_ResourceLoader_not_class_forName.patch
>
>
> This affects SnowballPorterFilterFactory and PhoneticFilterFactory.
> In Solr I encountered this problem when I specified an encoder and I was forced to put the library in WEB-INF/lib instead of /solr/lib/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]