Add numDeletedDocs() to IndexReader

2008-01-11 Thread Shai Erera
Hi guys, I had a need to know how many deleted documents are in the index. I noticed there isn't an API for it in IndexReader, however the information can be obtained by calling IndexReader.maxDoc() - IndexReader.numDocs(). Do you think it's worth adding such an API to IndexReader? Cheers, Shai

Re: Add numDeletedDocs() to IndexReader

2008-01-11 Thread Shai Erera
t; To: java-dev@lucene.apache.org > Sent: Friday, January 11, 2008 2:30:24 PM > Subject: Add numDeletedDocs() to IndexReader > > Hi guys, > > I had a need to know how many deleted documents are in the index. I > noticed > there isn't an API for it in IndexReader, however t

Re: Add numDeletedDocs() to IndexReader

2008-01-11 Thread Otis Gospodnetic
ROTECTED]> To: java-dev@lucene.apache.org Sent: Friday, January 11, 2008 2:30:24 PM Subject: Add numDeletedDocs() to IndexReader Hi guys, I had a need to know how many deleted documents are in the index. I noticed there isn't an API for it in IndexReader, however the information can b

Re: Add numDeletedDocs() to IndexReader

2008-01-11 Thread Shai Erera
g time ago... maybe on some local > version... > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > - Original Message > From: Shai Erera <[EMAIL PROTECTED]> > To: java-dev@lucene.apache.org > Sent: Friday, January 11, 2008 2:30:2

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-11 Thread Shai Erera (JIRA)
er: Shai Erera >Priority: Minor > Fix For: 2.4 > > > Add numDeletedDocs to IndexReader. Basically, the implementation is as simple > as doing: > public int numDeletedDocs() { > return deletedDocs == null ? 0 : deletedDocs.count(); > } > in SegmentRead

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-11 Thread Yonik Seeley (JIRA)
Docs()? > Add numDeletedDocs to IndexReader > - > > Key: LUCENE-1131 > URL: https://issues.apache.org/jira/browse/LUCENE-1131 > Project: Lucene - Java > Issue Type: New Feature >

[jira] Created: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-11 Thread Shai Erera (JIRA)
Add numDeletedDocs to IndexReader - Key: LUCENE-1131 URL: https://issues.apache.org/jira/browse/LUCENE-1131 Project: Lucene - Java Issue Type: New Feature Reporter: Shai Erera Priority

[jira] Updated: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-11 Thread Shai Erera (JIRA)
necessary readers. > Add numDeletedDocs to IndexReader > - > > Key: LUCENE-1131 > URL: https://issues.apache.org/jira/browse/LUCENE-1131 > Project: Lucene - Java > Issue Type: New Feature >

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-14 Thread Otis Gospodnetic (JIRA)
, so calling it twice won't be a performance killer, esp. since this is not something you'd call frequently, I imagine. However, I do agree about numDeletedDocs() being nice for hiding implementation details. > Add numDeletedDo

[jira] Assigned: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-01-14 Thread Otis Gospodnetic (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Otis Gospodnetic reassigned LUCENE-1131: Assignee: Otis Gospodnetic > Add numDeletedDocs to IndexRea

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-03 Thread Michael McCandless (JIRA)
o in? > Add numDeletedDocs to IndexReader > - > > Key: LUCENE-1131 > URL: https://issues.apache.org/jira/browse/LUCENE-1131 > Project: Lucene - Java > Issue Type: New Feature >

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-04 Thread Otis Gospodnetic (JIRA)
iles. > Add numDeletedDocs to IndexReader > - > > Key: LUCENE-1131 > URL: https://issues.apache.org/jira/browse/LUCENE-1131 > Project: Lucene - Java > Issue Type: New Feature >

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-07 Thread Michael McCandless (JIRA)
mpat (adds new abstract method to IndexReader). Why don't we fallback to default impl, in IndexReader, of maxDoc() - numDocs()? Patch is much less invasive, and, we don't break back compat? maxDoc() is indeed cheap. > Add numDeletedDo

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-07 Thread Shai Erera (JIRA)
xDoc() - numDocs(). Not all extended classes implement it this way BTW. SegmentReader just calls deletedDocs.count(), rather then calling the two separate methods. > Add numDeletedDocs to IndexReader > - > > Key: LUCENE-1131 >

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-07 Thread Michael McCandless (JIRA)
Shai Erera >Assignee: Otis Gospodnetic >Priority: Minor > Fix For: 2.4 > > Attachments: LUCENE-1131.patch > > > Add numDeletedDocs to IndexReader. Basically, the implementation is as simple > as doing: > public int numDe

[jira] Commented: (LUCENE-1131) Add numDeletedDocs to IndexReader

2008-09-08 Thread Shai Erera (JIRA)
d in mind. As for extending classes, I agree that calling two methods has little performance overhead, but it just looks cleaner (for SegmentReader for example). Anyway, I don't have a strong opinion on whether we should override or not. I'll be fine with either. > Add numDele