mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
added the ability to retrieve the number of documents in the index
Former-commit-id: 9a430f2a1805669d3ef2450d98ca7c2b6ed12ee3
This commit is contained in:
@@ -194,4 +194,16 @@ public class CpeIndexReader extends BaseIndex {
|
|||||||
vendorSearchFieldAnalyzer.clear();
|
vendorSearchFieldAnalyzer.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of CPE entries stored in the index.
|
||||||
|
*
|
||||||
|
* @return the number of CPE entries stored in the index
|
||||||
|
*/
|
||||||
|
public int numDocs() {
|
||||||
|
if (indexReader == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return indexReader.numDocs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user