[ 
https://issues.apache.org/jira/browse/LUCENE-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653891#action_12653891
 ] 

Michael McCandless commented on LUCENE-1476:
--------------------------------------------


{quote}
In many cases after you have read an index, and retrieved document numbers, 
these are lazily returned to the client.

By the time some records are needed to be read, they may have already been 
deleted (at least this was the usage in old lucene, where deletions happened in 
the reader).

I think a lot of code assumes this, and calls the isDeleted() to ensure the 
document is still valid.
{quote}

But isn't that an uncommon use case?  It's dangerous to wait a long
time after getting a docID from a reader, before looking up the
document.  Most apps pull the doc right away, send it to the user, and
the docID isn't kept (I think?).

But still I agree: we can't eliminate random access to isDeleted
entirely.  We'd still have to offer it for such external cases.

I'm just saying the internal uses of isDeleted could all be switched
to iteration instead, and, we might get some performance gains from
it especially when the number of deletes on a segment is relatively low.


> BitVector implement DocIdSet
> ----------------------------
>
>                 Key: LUCENE-1476
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1476
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>         Attachments: LUCENE-1476.patch
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> BitVector can implement DocIdSet.  This is for making 
> SegmentReader.deletedDocs pluggable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to