Re: check if document is deleted using indexwriter

2009-01-23 Thread Michael McCandless
Could you just call IndexReader.numDocs (after updating your docs & reopening your reader)? Mike Marc Sturlese wrote: I am using IndexWriter updatedocument. If the doc has a duplicate it will delete the old one and insert de new one. If it has no duplicates in the index, it will just

Re: check if document is deleted using indexwriter

2009-01-22 Thread Marc Sturlese
I am using IndexWriter updatedocument. If the doc has a duplicate it will delete the old one and insert de new one. If it has no duplicates in the index, it will just insert. I do it for 1000 every time and would like to count how many times it deletes, to be able to count duplicates... Michael M

Re: check if document is deleted using indexwriter

2009-01-22 Thread Michael McCandless
IndexWriter currently has no way to check if a doc is deleted; you'd have to use IndexReader... The deleteDocuments methods in IndexWriter do not return a count (unlike IndexReader) because the request is simply buffered and then processed in bulk when the deletes are flush. So at the ti