lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <>
Subject [jira] [Commented] (PYLUCENE-12) Add PythonReusableAnalyzerBase, so we can create analyzers in Python
Date Fri, 02 Dec 2011 16:43:40 GMT


Michael McCandless commented on PYLUCENE-12:

RE the exception inside createComponents... strange!  Your exception indeed has all the details
(ie, shows the original traceback, from the createComponents method).

Yet, when I do exactly that change (stick the x in, then run the test case directly, I get

ERROR: testReusable (__main__.ReusableAnalyzerBaseTestCase)
Traceback (most recent call last):
  File "test/", line 36, in testReusable
    stream = method("test", reader)
JavaError: java.lang.RuntimeException: NameError
    Java stacktrace:
java.lang.RuntimeException: NameError
	at org.apache.pylucene.analysis.PythonReusableAnalyzerBase.createComponents(Native Method)
	at org.apache.lucene.analysis.ReusableAnalyzerBase.reusableTokenStream(

Ie, for some reason, I don't get the traceback from the createComponents method; all I see
is that a NameError had happened, not what name in particular, and what lines of Python source.

I'm on Linux, Python 64 bit, Java 1.6.0_21... I wonder if I somehow compiled things incorrectly?
> Add PythonReusableAnalyzerBase, so we can create analyzers in Python
> --------------------------------------------------------------------
>                 Key: PYLUCENE-12
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message