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
below:
----------------------------------------
yuzu:vajda> python samples/PorterStemmerAnalyzer.py
/Users/vajda/osaf/java/docs
/Volumes/Yuzu/osaf/osaf/PyLucene/jcc/samples/PorterStemmerAnalyzer.py(66)<module>()
-> foo = IndexModifier("index", PorterStemmerAnalyzer(), True)
(Pdb) n
/Volumes/Yuzu/osaf/osaf/PyLucene/jcc/samples/PorterStemmerAnalyzer.py(67)<module>()
-> IndexFiles(sys.argv[1], "index", PorterStemmerAnalyzer())
(Pdb) p foo
<IndexModifier: [EMAIL PROTECTED]@/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:
./samples/LuceneInAction/lia/advsearching/MultiFieldQueryParserTest.py
./samples/LuceneInAction/lia/extsearch/queryparser/AdvancedQueryParserTest.py
./samples/LuceneInAction/lia/extsearch/queryparser/CustomQueryParser.py
./samples/LuceneInAction/MultiFieldQueryParserTest.py
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.
Andi..
_______________________________________________
pylucene-dev mailing list
pylucene-dev@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev