[pylucene-dev] Issues with PorterStemmerAnalyzer,
MutliTermQueryParser in PyLucene-JCC
vajda at osafoundation.org
Tue May 20 19:57:16 PDT 2008
On Wed, 21 May 2008, Rajendra Prasad Murakonda wrote:
> But why can't I pass PorterStemmerAnalyzer as an analyzer to IndexModifier?
> Is it a restriction placed by PuLucene-JCC?
I don't know. You're not showing your code, how can I help you debug it ?
I just inserted some debugging statements to the sample code and it works
fine. I can pass a PorterStemmerAnalyzer instance to IndexModifier, see
yuzu:vajda> python samples/PorterStemmerAnalyzer.py
-> foo = IndexModifier("index", PorterStemmerAnalyzer(), True)
-> IndexFiles(sys.argv, "index", PorterStemmerAnalyzer())
(Pdb) p foo
<IndexModifier: Index at org.apache.lucene.store.FSDirectory@/Volumes/Yuzu/osaf/osaf/PyLucene/jcc/index>
>> It could very well have changed because of some static/non static method
>> naming conflicts with regards to parse(). Look at the jcc "Lucene in Action"
>> samples for examples on how to use MultiFieldQueryParser:
> I looked at the first sample earlier. In the first sample you have given the
> first parameter is a string where as in my code if I pass a string I am
> getting an exception saying parse expects a query object not a string.
Again, without your code, there is not much more I can tell you.
More information about the pylucene-dev