Hi all,

I'm new to PyLucene. I was just trying to understand the indexing part of
the lucene.I have installed PyLucene-3.0.1-1 and Python 2.6

 I wrote a sample code as shown below ,

import sys
import os

lucene.initVM(lucene.CLASSPATH)
store = os.getcwd()+"/index"
text_file = open('brad.mc...@enron.com.txt')

analyzer = lucene.StopAnalyzer()
writer = lucene.IndexWriter(store, analyzer, True)

document = lucene.Document()
document.add(lucence.Field("Subject", text_file, lucene.Field.Store.YES,
lucene.Field.Index.UN_TOKENIZED))
writer.addDocument(document)


When i tried to run the script it is showing me this error...

Traceback (most recent call last):
  File "abc.py", line 9, in <module>
    analyzer = lucene.StopAnalyzer()
lucene.InvalidArgsError: (<type 'StopAnalyzer'>, '__init__', ())


How to solve this....??

Reply via email to