Hi All -
I'm running Apache 2.0.54, mod_python 3.1.4, and Python 2.4.1 with
PyLucene 0.9.9. I'm trying to incorporate Porter stemming into a
search application I'm working on.
I'm defining my PorterStemmerAnalyzer class exactly as in the sample
included with PyLucene 0.9.9:
class PorterStemmerAnalyzer(object):
def tokenStream(self, fieldName, reader):
result = StandardTokenizer(reader)
result = StandardFilter(result)
result = LowerCaseFilter(result)
result = PorterStemFilter(result)
result = StopFilter(result, StopAnalyzer.ENGLISH_STOP_WORDS)
return result
I have a simple test of this stemmer outside of mod_python:
p = PorterStemmerAnalyzer()
foo = QueryParser.parse("mucking shoes shiny","text",PorterStemmerAnalyzer()
print foo.toString()
When I run this in python2.4, it gives me correct output without problems.
But when I run the equivalent test via mod_python:
def handler(req):
req.content_type = "text/plain"
p = PorterStemmerAnalyzer()
foo = QueryParser.parse("mucking shoes
shiny","text",PorterStemmerAnalyzer())
req.write(foo.toString())
return apache.OK
...the execution hangs, and my apache server will not return a result.
It isn't specific to the PorterStemFilter call in
PorterStemmerAnalyzer.tokenStream; it happens even if I comment that
out.
Any ideas for how to make this work? It would be a great feature if we
could get it going.
--
jonah
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev