You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Otis Gospodnetic (JIRA)" <ji...@apache.org> on 2007/04/09 22:53:32 UTC
[jira] Created: (LUCENE-859) Expose the number of deleted docs in
index/segment
Expose the number of deleted docs in index/segment
--------------------------------------------------
Key: LUCENE-859
URL: https://issues.apache.org/jira/browse/LUCENE-859
Project: Lucene - Java
Issue Type: New Feature
Components: Index
Reporter: Otis Gospodnetic
Assigned To: Otis Gospodnetic
Priority: Minor
Attachments: LUCENE-859
Use case:
We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
I'm attaching patch that touches the following:
M src/test/org/apache/lucene/index/TestSegmentReader.java
M src/java/org/apache/lucene/index/MultiReader.java
M src/java/org/apache/lucene/index/IndexReader.java
M src/java/org/apache/lucene/index/FilterIndexReader.java
M src/java/org/apache/lucene/index/ParallelReader.java
M src/java/org/apache/lucene/index/SegmentReader.java
SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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-859) Expose the number of deleted docs in
index/segment
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otis Gospodnetic updated LUCENE-859:
------------------------------------
Attachment: LUCENE-859
El patcho.
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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] Commented: (LUCENE-859) Expose the number of deleted docs in
index/segment
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487635 ]
Yonik Seeley commented on LUCENE-859:
-------------------------------------
Isn't this redundant with existing IndexReader methods?
deletedDocs() == maxDoc() - numDocs()
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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] Commented: (LUCENE-859) Expose the number of deleted docs in
index/segment
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487644 ]
Yonik Seeley commented on LUCENE-859:
-------------------------------------
> Though it might still be handy to have something with main() that spits out the number of deleted
> documents, as SegmentReader has in my patch.
I don't understand that comment. I don't see anything in your patch besides the implementation of deletedDocs().
> Maybe that should be added to the existing IndexReader.main ?
That sounds fine.
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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] Closed: (LUCENE-859) Expose the number of deleted docs in
index/segment
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otis Gospodnetic closed LUCENE-859.
-----------------------------------
Resolution: Won't Fix
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Doooooh, of course! numDocs() looks like this:
public int numDocs() {
int n = maxDoc();
if (deletedDocs != null)
n -= deletedDocs.count();
return n;
}
Won't Fix.
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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] Commented: (LUCENE-859) Expose the number of deleted docs in
index/segment
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487640 ]
Otis Gospodnetic commented on LUCENE-859:
-----------------------------------------
Though it might still be handy to have something with main() that spits out the number of deleted documents, as SegmentReader has in my patch.
What do you think about committing just that? Maybe that should be added to the existing IndexReader.main ?
Or maybe it's time to start an app/class in contrib/index that takes various command line parameters and prints out information about the index? If so, I'll move that to a new JIRA issue.
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
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