Revision: 17409
http://sourceforge.net/p/gate/code/17409
Author: valyt
Date: 2014-02-24 17:13:35 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
Added method to get the indexed documents count.
Modified Paths:
--------------
mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
Modified: mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
===================================================================
--- mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
2014-02-24 16:14:46 UTC (rev 17408)
+++ mimir/branches/5.0/mimir-core/src/gate/mimir/MimirIndex.java
2014-02-24 17:13:35 UTC (rev 17409)
@@ -886,8 +886,21 @@
public DocumentCollection getDocumentCollection() {
return documentCollection;
}
-
+
/**
+ * Gets the total number of documents currently searcheable
+ * @return
+ */
+ public long getIndexedDocumentsCount() {
+ if(subIndexes != null && subIndexes.length > 0 &&
+ subIndexes[0].getIndex() != null){
+ return subIndexes[0].getIndex().numberOfDocuments;
+ } else {
+ return 0;
+ }
+ }
+
+ /**
* Gets the {@link DocumentData} for a given document ID, from the on disk
* document collection. In memory caching is performed to reduce the cost of
* this call.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs