lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cfow...@jwpepper.com
Subject Re: deleteDocuments being ingnored
Date Mon, 09 Oct 2006 16:11:08 GMT
My apologies, the IndexReader code I included was a commented out trial. 
Here is the active version. Sorry for the error:

                IndexReader ir = IndexReader.open(indexDir);
                System.out.println(">>>" + ir.numDocs());
                int deleted = ir.deleteDocuments(new Term("filename"
,f.getAbsolutePath()));
                System.out.println("deletes?" + ir.hasDeletions());
                ir.close();
 
                if (deleted > 0) {
                        System.out.println("deleted old index of " + 
f.getAbsolutePath());
                }
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message