lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donna L Gresh <gr...@us.ibm.com>
Subject question about flush(), optimize(), and deleted documents
Date Thu, 19 Jul 2007 12:08:46 GMT
I have run into problems with an error that I am trying to access a 
deleted document when doing something along the lines below; my brief 
question is, what is necessary to avoid "seeing" deleted documents? Is an 
optimize() necessary? Or will a flush() or close() accomplish the same 
thing? 

IndexReader ireader = IndexReader.open(directoryName);
int numdocs = ireader.numDocs();
for (int i=0; i<numdocs; i++) {
        Document doc = ireader.document(i);
        Field field = doc.getField("id");



Donna L. Gresh
Services Research, Mathematical Sciences Department
IBM T.J. Watson Research Center
(914) 945-2472
http://www.research.ibm.com/people/g/donnagresh
gresh@us.ibm.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message