Hi, I was using PyLucene with GCJ in my TurboGears project. I modified CherryPy to solve the threading issues. Now that PyLucene with JCC solved this threading issues I am migrating to it. I am half way through, and thanks to the developers, there are no threading issues with CherryPy. However, I have following queries:
1. I was using PorterStemmerAnalyzer with PyLucene-GCJ but I am unable to use it with PyLucene-JCC. Where ever I pass PorterStemmerAnalyzer as a parameter(let's sat to IndexModifer, for example), I get a invalid arguments exception. The PorterStemmerAnalyzer I am using is inheriting from Object and the PorterStemmerAnalyzer present on osafoundation website is inheriting from lucene.PythonAnalyzer. That was the only difference. So I modified my PorterStemmerAnalyzer accordingly. But the application crashes with this change. I get a Visual Studio C++ error saying python.exe has been terminated in an unusual way. StandardAnalyzer works like a charm though. So is there a special way to use PorterStemmerAnalyzer with PyLucene-JCC? 2. I was using MultiTermQueryParser with PyLucene-GCJ. I used to construct a query as a string(example: (Filed1:"value to search for" AND Field2:"Value to Search for")) and pass it to the parser to constuct the query and then execute the query. But this syntax no longer works for MultiTermQueryParser. I get an exception saying Query object expected and a str is received. But according to the lucene API, the parser.parse expects a query string not a query object. And then I figured out that parser.parse() is expecting two equal length lists. So do I have to pass a list of terms to search and the list of fields corresponding to terms etc to the parse() function? Is there any wrapper for the actual MultiTermQueryParser that PyLucene-JCC is providing? That's why the query syntax changed? 3. I am assuming that initVM() should be called only once and whenever we are using indexer from another thread we need to use getVMEnv().attachCurrentThread(). Am I correct? Any help is much appreciated, Thanks, - Raj
_______________________________________________ pylucene-dev mailing list pylucene-dev@osafoundation.org http://lists.osafoundation.org/mailman/listinfo/pylucene-dev