On Fri, 2 Dec 2011, Michael McCandless (Commented) (JIRA) wrote:
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 this:
Did you build your lucene module with --shared (and did you build jcc with
shared enabled, the default normally). It occurred to me that exception
reporting is a bit weaker in non shared mode because the PythonException
java class is not present. Just a thought...
Andi..
======================================================================
ERROR: testReusable (__main__.ReusableAnalyzerBaseTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_ReusableAnalyzerBase.py", 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(ReusableAnalyzerBase.java:73)
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? Odd.
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