pythonlucenepylucene

PyLucene : ImportError: cannot import name SimpleFSDirectory


So I want to play a little with PyLucene because someone gave me a cfs file and PyLucene looked like the best way to deal with that in python. I followed only the tutorial from http://bendemott.blogspot.co.uk/2013/11/installing-pylucene-4-451.html

I am on Ubuntu 12.04

Then when I do in my console

python
>>> import lucene
>>> from lucene import SimpleFSDirectory

I get this error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name SimpleFSDirectory

Any hint or advice ?


Solution

  • After few days looking for the answer and 13 hours after asking Stackoverflow, found it:

    from org.apache.lucene.store import SimpleFSDirectory

    Apparently, most of tutorials are outdated.