[Dev] PyLucene Question

darryl developer at csrules.dyndns.org
Sun May 30 01:36:23 PDT 2004


>Any idea on how to solve that one would be welcome.
>These latest changes are checked in, with the additions untested. I checked it
>in so that you could proceed and elucidate the 'delete' riddle :)
>(The 'delete$' methods are commented out).
>
>Andi..
>  
>

Well, so far all i've gotten to work was actually editing 
IndexReader.java and renaming the delete to deleteTerm and then
building everything from there. No unresolved symbols.

 >>> import PyLucene
 >>> dir(PyLucene.IndexReader)
['__class__', '__del__', '__delattr__', '__dict__', '__doc__', 
'__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', 
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__str__', '__swig_getmethods__', '__swig_setmethods__', '__weakref__', 
'_s', 'close', 'deleteTerm', 'docFreq', 'document', 'getCurrentVersion', 
'hasDeletions', 'indexExists', 'isDeleted', 'isLocked', 'lastModified', 
'maxDoc', 'numDocs', 'open', 'setNorm', 'termDocs', 'termPositions', 
'terms', 'undeleteAll', 'unlock']
 >>> directory = 
PyLucene.FSDirectory_getDirectory('doc-pylucene-indx',False)
 >>> reader = PyLucene.IndexReader.open(directory)
 >>> reader.numDocs()
499
 >>> reader.deleteTerm(400)
 >>> reader.numDocs()
498
 >>> reader.isDeleted(400
... )
True
 >>> reader.close()
 >>> reader = PyLucene.IndexReader.open(directory)
 >>> reader.numDocs()
498
 >>>

-darryl

-- 
http://randomthoughts.vandorp.ca/WK/blog



More information about the Dev mailing list