lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Vajda (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PYLUCENE-12) Add PythonReusableAnalyzerBase, so we can create analyzers in Python
Date Fri, 02 Dec 2011 04:08:40 GMT

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

Andi Vajda commented on PYLUCENE-12:
------------------------------------

About the lack of information in the stacktrace, I added a random x into the createComponents
method and I'm getting this:

{noformat}
Traceback (most recent call last):
  File "test/test_ReusableAnalyzerBase.py", line 36, in testReusable
    stream = method("test", reader)
JavaError: org.apache.jcc.PythonException: global name 'xfirst' is not defined
Traceback (most recent call last):
  File "test/test_ReusableAnalyzerBase.py", line 24, in createComponents
    last = StopFilter(Version.LUCENE_CURRENT, xfirst, StopAnalyzer.ENGLISH_STOP_WORDS_SET)
NameError: global name 'xfirst' is not defined

    Java stacktrace:
org.apache.jcc.PythonException: global name 'xfirst' is not defined
Traceback (most recent call last):
  File "test/test_ReusableAnalyzerBase.py", line 24, in createComponents
    last = StopFilter(Version.LUCENE_CURRENT, xfirst, StopAnalyzer.ENGLISH_STOP_WORDS_SET)
NameError: global name 'xfirst' is not defined

	at org.apache.pylucene.analysis.PythonReusableAnalyzerBase.createComponents(Native Method)
	at org.apache.lucene.analysis.ReusableAnalyzerBase.reusableTokenStream(ReusableAnalyzerBase.java:73)
{noformat}

Seems plenty of detail to me. What do you think is missing ?

                
> 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

        

Mime
View raw message