| Index: TestBoolean2.java |
| =================================================================== |
| --- TestBoolean2.java (revision 331108) |
| +++ TestBoolean2.java (working copy) |
| @@ -70,13 +70,17 @@ |
| //System.out.println("Query: " + queryText); |
| Query query1 = makeQuery(queryText); |
| BooleanQuery.setUseScorer14(true); |
| - Hits hits1 = searcher.search(query1); |
| + try { |
| + Hits hits1 = searcher.search(query1); |
| |
| - Query query2 = makeQuery(queryText); // there should be no need to parse again... |
| - BooleanQuery.setUseScorer14(false); |
| - Hits hits2 = searcher.search(query2); |
| + Query query2 = makeQuery(queryText); // there should be no need to parse again... |
| + BooleanQuery.setUseScorer14(false); |
| + Hits hits2 = searcher.search(query2); |
| |
| - CheckHits.checkHitsQuery(query2, hits1, hits2, expDocNrs); |
| + CheckHits.checkHitsQuery(query2, hits1, hits2, expDocNrs); |
| + } finally { // even when a test fails. |
| + BooleanQuery.setUseScorer14(false); |
| + } |
| } |
| |
| public void testQueries01() throws Exception { |