You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org> on 2011/11/22 21:06:40 UTC

[jira] [Commented] (PYLUCENE-12) Add PythonReusableAnalyzerBase, so we can create analyzers in Python

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

Michael McCandless commented on PYLUCENE-12:
--------------------------------------------

I noticed one unfriendliness here: if I modify the MyAnalyzer class (in test_ReusableAnalyzerBase.py), adding an empty ctor (def __init__) that fails to call super's __init__, then I get a SEGV.

I know we document that you must call super (http://lucene.apache.org/pylucene/jcc/documentation/readme.html#extensions), but, can we make this throw an exception instead of SEGV, to be more friendly?  Or is that hard...?
                
> Add PythonReusableAnalyzerBase, so we can create analyzers in Python
> --------------------------------------------------------------------
>
>                 Key: PYLUCENE-12
>                 URL: https://issues.apache.org/jira/browse/PYLUCENE-12
>             Project: PyLucene
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>         Attachments: PYLUCENE-12.patch, PYLUCENE-12.patch
>
>
> Lucene now has a useful helper class, ReusableAnalyzerBase; you subclass it and override one method, to create an analyzer that provides reusableTokenStream impl.
> I think we should expose it in Python... patch is simple.

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