OK, interesting. This case looks like it'd be a good fit for iteration-API to access deleted docs. (And, a good case for column- stride fields, too!).

Thanks for sharing Ian,

Mike

Ian Lea wrote:

Hi Mike


I've got some applications that use lucene purely as a place to store
data, with no searching other than by product id, and have programs
that get all the data out of the store by code like

for (int i = 0; i < max; i++) {
   if (!reader.isDeleted(i)) {
     Document doc = reader.document(i);
   ...
}

The index has regular updates and occasional optimizes so normally
does contain deleted docs.

If the isDeleted() method was removed it would only be a minor
inconvenience - I'd be happy to code to any new API calls, or change
the method to call optimize first, or whatever.



--
Ian.
ian....@gmail.com


On Fri, Jan 23, 2009 at 8:25 PM, Michael McCandless
<luc...@mikemccandless.com> wrote:
We are considering replacing the current random-access
IndexReader.isDeleted(int docID) method with an iterator & skipTo
(DocIdSet) access that would let you iterate through the deleted
docIDs, instead.

At the same time we would move to a new API to replace
IndexReader.document(int docID) that would no longer check whether the
document is deleted.

This is being discussed now under several Jira issues and on
java-dev.

Would this be a problem for any Lucene applications out there?

How is isDeleted used today (outside of Lucene)?  Normally an
IndexSearcher would never return a deleted document, and so "in
theory" a deleted docID should never "escape" Lucene's APIs.

So I'm curious what applications in fact rely on isDeleted, and how
that method is being used...

Thanks,

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to