You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2008/04/18 15:58:23 UTC

[jira] Created: (LUCENE-1267) add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()

add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()
-----------------------------------------------------------------------

                 Key: LUCENE-1267
                 URL: https://issues.apache.org/jira/browse/LUCENE-1267
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Index
    Affects Versions: 2.3.1, 2.3, 2.2, 2.1, 2.0.0, 1.9
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 2.4


Spinoff from here:

  http://mail-archives.apache.org/mod_mbox/lucene-java-user/200804.mbox/%3c405706.11550.qm@web65411.mail.ac4.yahoo.com%3e

I think we should add maxDoc() and numDocs() methods to IndexWriter,
and deprecate docCount() in favor of maxDoc().  To do this I think we
should cache the deletion count of each segment in the segments file.



-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1267) add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-1267:
---------------------------------------

    Attachment: LUCENE-1267.patch

Attached patch.

This changes the segments file to store the deletion count per
segment. I added package-private get/setDelCount to SegmentInfo.  I
also added BitVector.getAndSet, which sets the bit but returns the
starting value of that bit. I use this to only increment deletion
count if the doc wasn't already deleted.

I plan to commit in a day or two.

> add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-1267
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1267
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1267.patch
>
>
> Spinoff from here:
>   http://mail-archives.apache.org/mod_mbox/lucene-java-user/200804.mbox/%3c405706.11550.qm@web65411.mail.ac4.yahoo.com%3e
> I think we should add maxDoc() and numDocs() methods to IndexWriter,
> and deprecate docCount() in favor of maxDoc().  To do this I think we
> should cache the deletion count of each segment in the segments file.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1267) add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1267.
----------------------------------------

    Resolution: Fixed

> add numDocs() and maxDoc() methods to IndexWriter; deprecate docCount()
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-1267
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1267
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: LUCENE-1267.patch
>
>
> Spinoff from here:
>   http://mail-archives.apache.org/mod_mbox/lucene-java-user/200804.mbox/%3c405706.11550.qm@web65411.mail.ac4.yahoo.com%3e
> I think we should add maxDoc() and numDocs() methods to IndexWriter,
> and deprecate docCount() in favor of maxDoc().  To do this I think we
> should cache the deletion count of each segment in the segments file.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org