public void testCarmelTopKPruning() throws Exception {
IndexReader in = IndexReader.open(sourceDir, true);
// validate full scores - without pruning, just to make sure we test the right thing
validateDocScores(fullScores, in, false, false); // validate both docs and scores
// prune reader
CarmelTopKTermPruningPolicy tfp = new CarmelTopKTermPruningPolicy(in, null, K, EPSILON, R, null);
PruningReader tfr = new PruningReader(in, null, tfp);
// create the pruned index
RAMDirectory targetDir = new RAMDirectory();
WhitespaceAnalyzer analyzer = new WhitespaceAnalyzer(TEST_VERSION_CURRENT);