SOLR-3948: Calculate/display deleted documents in admin interface.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1419939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-11 00:06:56 +00:00
parent 4e584a86a6
commit 4e439e791e
7 changed files with 18 additions and 1 deletions

View File

@ -128,6 +128,9 @@ New Features
* SOLR-4028: When using ZK chroot, it would be nice if Solr would create the
initial path when it doesn't exist. (Tomas Fernandez Lobbe via Mark Miller)
* SOLR-3948: Calculate/display deleted documents in admin interface.
(Shawn Heisey via Mark Miller)
Optimizations
----------------------

View File

@ -547,6 +547,7 @@ public class LukeRequestHandler extends RequestHandlerBase
indexInfo.add("numDocs", reader.numDocs());
indexInfo.add("maxDoc", reader.maxDoc());
indexInfo.add("deletedDocs", reader.maxDoc() - reader.numDocs());
indexInfo.add("version", reader.getVersion()); // TODO? Is this different then: IndexReader.getCurrentVersion( dir )?
indexInfo.add("segmentCount", reader.leaves().size());

View File

@ -1983,6 +1983,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
lst.add("caching", cachingEnabled);
lst.add("numDocs", reader.numDocs());
lst.add("maxDoc", reader.maxDoc());
lst.add("deletedDocs", reader.maxDoc() - reader.numDocs());
lst.add("reader", reader.toString());
lst.add("readerDir", reader.directory());
lst.add("indexVersion", reader.getVersion());

View File

@ -200,6 +200,9 @@ sammy.get
$( '.maxDoc dd', index_data_element )
.html( core_data.index.maxDoc );
$( '.deletedDocs dd', index_data_element )
.html( core_data.index.deletedDocs );
$( '.optimized dd', index_data_element )
.addClass( !core_data.index.hasDeletions ? 'ico-1' : 'ico-0' );

View File

@ -114,6 +114,7 @@ sammy.get
var data = {
'index_num-docs' : response['index']['numDocs'],
'index_max-doc' : response['index']['maxDoc'],
'index_deleted-docs' : response['index']['deletedDocs'],
'index_version' : response['index']['version'],
'index_segmentCount' : response['index']['segmentCount'],
'index_last-modified' : response['index']['lastModified']

View File

@ -184,6 +184,11 @@ limitations under the License.
<dd></dd>
</dl></li>
<li class="deletedDocs"><dl class="clearfix">
<dt><span>deletedDocs:</span></dt>
<dd></dd>
</dl></li>
<li class="optimized"><dl class="clearfix">
<dt><span>optimized:</span></dt>
<dd class="ico"><span></span></dd>

View File

@ -39,6 +39,9 @@ limitations under the License.
<dt class="index_max-doc">Max Doc:</dt>
<dd class="index_max-doc value"></dd>
<dt class="index_deleted-docs">Deleted Docs:</dt>
<dd class="index_deleted-docs value"></dd>
<dt class="index_version">Version:</dt>
<dd class="index_version value"></dd>