writer.close();
IndexReader reader = IndexReader.open(this.directory);
IndexSearcher searcher = new IndexSearcher(reader);
Query query = new ConstantScoreQuery(new TermQuery(new Term("value", "5")));
Assert.assertEquals(1.0, searcher.search(query, 1).getMaxScore(), 0.00001);
Query noBonus = new PredicateBonusQuery(query, Predicates.NONE, 10.0f);
Assert.assertEquals(1.0, searcher.search(noBonus, 1).getMaxScore(), 0.00001);