You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Nicholas Knize <nk...@gmail.com> on 2015/03/16 01:03:40 UTC
SegmentInfo.maxDoc() vs getDocCount()
Had to make a minor change in ES to support this refactor (no biggie).
Having fresh eyes and curiosity I thought I'd ask what the reason is behind
this variable name, 'maxDoc', if deletes are not taken into consideration?
Its a bit of a confusing variable and method name.
Re: SegmentInfo.maxDoc() vs getDocCount()
Posted by Michael McCandless <lu...@mikemccandless.com>.
On Sun, Mar 15, 2015 at 5:03 PM, Nicholas Knize <nk...@gmail.com> wrote:
> Had to make a minor change in ES to support this refactor (no biggie).
> Having fresh eyes and curiosity I thought I'd ask what the reason is behind
> this variable name, 'maxDoc', if deletes are not taken into consideration?
> Its a bit of a confusing variable and method name.
You are right: maxDoc is really quite a ridiculous (yet, historical,
legacy, been in Lucene forever) name. Lucene historically has used
"numDocs" to be number of live docs in the index, and "maxDoc" to be
number of live + deleted (but not yet merged away) docs.
I'm personally API blind to both these names :)
Maybe we should fix it?
Mike McCandless
http://blog.mikemccandless.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org