Hello all,

I've recently inherited a PyLucene project with very little knowledge of
PyLucene and Lucene itself.

To cut to the chase, I think I've screwed something up. Basically there
is a script we have that runs, pulling records from a text file, and
then puts them into a "queue" to update the indexes later.

In any case, the basic jist of the script is this:

#### START ####

def main():
    reader = Reader("../text.txt")
    '''to add id for reindexing profile'''
    queue = StaleQueue() 
    '''lucene index to store events'''
    indexDirectory = "/home/data/qdb/events"
    analyzer = PyLucene.StandardAnalyzer()
    writer = PyLucene.IndexWriter(indexDirectory, analyzer, False)
    counter = 0
    line = reader.get_line()
    while(line):
        counter +=1
        if counter % 10000 == 0:
            print "passing: %s" %counter
            writer.optimize()
            print "optimized - resuming"
        handler = EfDemo(line)
        indexer = EventIndexer(writer)
        indexer.index(handler.get_id(), handler)
        queue.add(handler.get_id())
        line = reader.get_line()
    writer.close()

#### END ####

It dies after 1000 records (probably has to do with the optimization...
but I have no clue how to check):

#### START ####

Traceback (most recent call last):
  File "./qdbefdemohandler.py", line 48, in ?
    main()
  File "./qdbefdemohandler.py", line 29, in main
    indexer.index(handler.get_andii_id(), handler)
  File "/usr/local/lib/python2.4/site-packages/qdb/qdbindexer.py", line
17, in index
    self.writer.addDocument(doc)
  File "/usr/lib/python2.4/site-packages/PyLucene.py", line 1902, in
addDocument
    def addDocument(*args): return
_PyLucene.IndexWriter_addDocument(*args)
PyLucene.JavaError:
java.io.FileNotFoundException: /home/data/qdb/events/_30fvb.fnm (No such
file or directory)

#### END ####

Thoughts? Help a PyLu newbie out! :)

-- 
Jared Kuolt <[EMAIL PROTECTED]>


_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to