lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject svn commit: r1204850 - in /lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src: java/org/apache/lucene/benchmark/byTask/feeds/ java/org/apache/lucene/benchmark/byTask/programmatic/ java/org/apache/lucene/benchmark/byTask/tasks/ java/org/apache/l...
Date Tue, 22 Nov 2011 08:06:18 GMT
Author: shaie
Date: Tue Nov 22 08:06:13 2011
New Revision: 1204850

URL: http://svn.apache.org/viewvc?rev=1204850&view=rev
Log:
get rid of some warnings and deprecated API usage in benchmark package

Modified:
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LineDocSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AddDocTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReopenReaderTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/TrecJudge.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/DocNameExtractor.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SubmissionReport.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/StreamUtilsTest.java
    lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/quality/TestQualityRun.java

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java
Tue Nov 22 08:06:13 2011
@@ -130,7 +130,6 @@ public abstract class ContentItemsSource
    * items generated since the last reset, so it's important to call
    * super.resetInputs in case you override this method.
    */
-  @SuppressWarnings("unused")
   public void resetInputs() throws IOException {
     bytesCount = 0;
     itemCount = 0;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DirContentSource.java
Tue Nov 22 08:06:13 2011
@@ -45,6 +45,7 @@ import java.util.Stack;
 public class DirContentSource extends ContentSource {
 
   private static final class DateFormatInfo {
+    public DateFormatInfo() {}
     DateFormat df;
     ParsePosition pos;
   }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
Tue Nov 22 08:06:13 2011
@@ -78,8 +78,9 @@ import org.apache.lucene.document.Field.
 public class DocMaker {
 
   private static class LeftOver {
-    private DocData docdata;
-    private int cnt;
+    public LeftOver() {}
+    DocData docdata;
+    int cnt;
   }
 
   private Random r;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiContentSource.java
Tue Nov 22 08:06:13 2011
@@ -44,6 +44,7 @@ import org.xml.sax.helpers.XMLReaderFact
  */
 public class EnwikiContentSource extends ContentSource {
 
+  @SuppressWarnings("synthetic-access")
   private class Parser extends DefaultHandler implements Runnable {
     private Thread t;
     private boolean threadDone;
@@ -55,6 +56,9 @@ public class EnwikiContentSource extends
     private String time;
     private String id;
     
+    public Parser() {
+    }
+    
     String[] next() throws NoMoreDataException {
       if (t == null) {
         threadDone = false;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/EnwikiQueryMaker.java
Tue Nov 22 08:06:13 2011
@@ -39,8 +39,7 @@ import org.apache.lucene.util.Version;
  * A QueryMaker that uses common and uncommon actual Wikipedia queries for
  * searching the English Wikipedia collection. 90 queries total.
  */
-public class EnwikiQueryMaker extends AbstractQueryMaker implements
-    QueryMaker {
+public class EnwikiQueryMaker extends AbstractQueryMaker {
 
   // common and a few uncommon queries from wikipedia search logs
   private static String[] STANDARD_QUERIES = { "Images catbox gif",

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/FileBasedQueryMaker.java
Tue Nov 22 08:06:13 2011
@@ -41,8 +41,7 @@ import java.util.List;
  * file.query.maker.file=c:/myqueries.txt
  * file.query.maker.default.field=body
  */
-public class FileBasedQueryMaker extends AbstractQueryMaker implements QueryMaker{
-
+public class FileBasedQueryMaker extends AbstractQueryMaker {
 
   @Override
   protected Query[] prepareQueries() throws Exception {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LineDocSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LineDocSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LineDocSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LineDocSource.java
Tue Nov 22 08:06:13 2011
@@ -72,6 +72,7 @@ public class LineDocSource extends Conte
     public SimpleLineParser(String[] header) {
       super(header);
     }
+    @Override
     public void parseLine(DocData docData, String line) {
       int k1 = 0;
       int k2 = line.indexOf(WriteLineDocTask.SEP, k1);
@@ -122,6 +123,7 @@ public class LineDocSource extends Conte
       }
     }
     
+    @Override
     public void parseLine(DocData docData, String line) {
       int n = 0;
       int k1 = 0;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/LongToEnglishQueryMaker.java
Tue Nov 22 08:06:13 2011
@@ -26,11 +26,6 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.util.English;
 import org.apache.lucene.util.Version;
 
-
-/**
- *
- *
- **/
 public class LongToEnglishQueryMaker implements QueryMaker {
   long counter = Long.MIN_VALUE + 10;
   protected QueryParser parser;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ReutersContentSource.java
Tue Nov 22 08:06:13 2011
@@ -43,6 +43,7 @@ import org.apache.lucene.benchmark.byTas
 public class ReutersContentSource extends ContentSource {
 
   private static final class DateFormatInfo {
+    DateFormatInfo() {}
     DateFormat df;
     ParsePosition pos;
   }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SimpleQueryMaker.java
Tue Nov 22 08:06:13 2011
@@ -33,8 +33,7 @@ import java.util.ArrayList;
  * A QueryMaker that makes queries for a collection created 
  * using {@link org.apache.lucene.benchmark.byTask.feeds.SingleDocSource}.
  */
-public class SimpleQueryMaker extends AbstractQueryMaker implements QueryMaker {
-
+public class SimpleQueryMaker extends AbstractQueryMaker {
 
   /**
    * Prepare the queries for this test.

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecContentSource.java
Tue Nov 22 08:06:13 2011
@@ -58,6 +58,7 @@ import org.apache.lucene.util.ThreadInte
 public class TrecContentSource extends ContentSource {
 
   private static final class DateFormatInfo {
+    DateFormatInfo() {}
     DateFormat[] dfs;
     ParsePosition pos;
   }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/programmatic/Sample.java
Tue Nov 22 08:06:13 2011
@@ -73,6 +73,7 @@ public class Sample {
     
     // execute
     top.doLogic();
+    top.close();
   }
 
   // Sample programmatic settings. Could also read from file.

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AddDocTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AddDocTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AddDocTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AddDocTask.java
Tue Nov 22 08:06:13 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
-import java.text.NumberFormat;
-
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.feeds.DocMaker;
 import org.apache.lucene.document.Document;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java
Tue Nov 22 08:06:13 2011
@@ -74,8 +74,6 @@ public class CreateIndexTask extends Per
     super(runData);
   }
 
-  
-  
   public static IndexDeletionPolicy getIndexDeletionPolicy(Config config) {
     String deletionPolicyName = config.get("deletion.policy", "org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy");
     if (deletionPolicyName.equals(NoDeletionPolicy.class.getName())) {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
Tue Nov 22 08:06:13 2011
@@ -17,16 +17,16 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
+import java.io.IOException;
+
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.utils.Config;
-import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexCommit;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.index.LogMergePolicy;
+import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriter.MaxFieldLength;
+import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
-import java.io.IOException;
-
+import org.apache.lucene.index.LogMergePolicy;
 
 /**
  * Open an index writer.

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
Tue Nov 22 08:06:13 2011
@@ -20,7 +20,6 @@ package org.apache.lucene.benchmark.byTa
 import java.io.IOException;
 import java.util.Collection;
 import java.util.HashSet;
-
 import java.util.List;
 import java.util.Set;
 
@@ -31,15 +30,14 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.Collector;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.ScoreDoc;
+import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.search.MultiTermQuery;
 import org.apache.lucene.search.TopFieldCollector;
-import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.TopScoreDocCollector;
 import org.apache.lucene.search.Weight;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Sort;
 import org.apache.lucene.store.Directory;
 
 

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
Tue Nov 22 08:06:13 2011
@@ -114,6 +114,8 @@ public class ReadTokensTask extends Perf
     int upto;
     int left;
     String s;
+    
+    ReusableStringReader() {}
     void init(String s) {
       this.s = s;
       left = s.length();

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReopenReaderTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReopenReaderTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReopenReaderTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReopenReaderTask.java
Tue Nov 22 08:06:13 2011
@@ -1,4 +1,5 @@
 package org.apache.lucene.benchmark.byTask.tasks;
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,7 +17,6 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
-
 import java.io.IOException;
 
 import org.apache.lucene.benchmark.byTask.PerfRunData;
@@ -34,8 +34,8 @@ public class ReopenReaderTask extends Pe
   @Override
   public int doLogic() throws IOException {
     IndexReader r = getRunData().getIndexReader();
-    IndexReader nr = r.reopen();
-    if (nr != r) {
+    IndexReader nr = IndexReader.openIfChanged(r);
+    if (nr != null) {
       getRunData().setIndexReader(nr);
       nr.decRef();
     }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
Tue Nov 22 08:06:13 2011
@@ -308,6 +308,7 @@ public class TaskSequence extends PerfTa
       this.task = task;
     }
 
+    @SuppressWarnings("synthetic-access")
     @Override
     public void run() {
       try {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WaitForMergesTask.java
Tue Nov 22 08:06:13 2011
@@ -1,4 +1,5 @@
 package org.apache.lucene.benchmark.byTask.tasks;
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,12 +17,7 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexReader;
 
 /**
  * Waits for merges to finish.

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
Tue Nov 22 08:06:13 2011
@@ -32,7 +32,7 @@ import org.apache.lucene.benchmark.byTas
 import org.apache.lucene.benchmark.byTask.utils.Config;
 import org.apache.lucene.benchmark.byTask.utils.StreamUtils;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
+import org.apache.lucene.document.Fieldable;
 
 /**
  * A task which writes documents, one line per document. Each line is in the
@@ -87,7 +87,7 @@ public class WriteLineDocTask extends Pe
   private DocMaker docMaker;
   private ThreadLocal<StringBuilder> threadBuffer = new ThreadLocal<StringBuilder>();
   private ThreadLocal<Matcher> threadNormalizer = new ThreadLocal<Matcher>();
-  private final String[] fieldsToWrite;;
+  private final String[] fieldsToWrite;
   private final boolean[] sufficientFields;
   private final boolean checkSufficientFields;
   
@@ -172,7 +172,7 @@ public class WriteLineDocTask extends Pe
 
     boolean sufficient = !checkSufficientFields;
     for (int i=0; i<fieldsToWrite.length; i++) {
-      Field f = doc.getField(fieldsToWrite[i]);
+      Fieldable f = doc.getFieldable(fieldsToWrite[i]);
       String text = f == null ? "" : matcher.reset(f.stringValue()).replaceAll(" ").trim();
       sb.append(text).append(SEP);
       sufficient |= text.length()>0 && sufficientFields[i];

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
Tue Nov 22 08:06:13 2011
@@ -52,7 +52,7 @@ public class StreamUtils {
 		Type(String csfType) {
 			this.csfType = csfType;
 		}
-		private InputStream inputStream(InputStream in) throws IOException {
+		InputStream inputStream(InputStream in) throws IOException {
 			try {
 				return csfType==null ? in : new CompressorStreamFactory().createCompressorInputStream(csfType,
in);
 			} catch (CompressorException e) {
@@ -60,7 +60,7 @@ public class StreamUtils {
     		ioe.initCause(e);
     		throw ioe;			}  
 		}
-		private OutputStream outputStream(OutputStream os) throws IOException {
+		OutputStream outputStream(OutputStream os) throws IOException {
 			try {
 				return csfType==null ? os : new CompressorStreamFactory().createCompressorOutputStream(csfType,
os);
 			} catch (CompressorException e) {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/QualityBenchmark.java
Tue Nov 22 08:06:13 2011
@@ -23,7 +23,7 @@ import org.apache.lucene.benchmark.quali
 import org.apache.lucene.benchmark.quality.utils.SubmissionReport;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TopDocs;
 
 /**
@@ -47,7 +47,7 @@ public class QualityBenchmark {
   protected QualityQueryParser qqParser;
   
   /** Index to be searched. */
-  protected Searcher searcher;
+  protected IndexSearcher searcher;
 
   /** index field to extract doc name for each search result; used for judging the results.
*/  
   protected String docNameField;
@@ -68,7 +68,7 @@ public class QualityBenchmark {
    *        and is important for judging the results.  
    */
   public QualityBenchmark(QualityQuery qqs[], QualityQueryParser qqParser, 
-      Searcher searcher, String docNameField) {
+      IndexSearcher searcher, String docNameField) {
     this.qualityQueries = qqs;
     this.qqParser = qqParser;
     this.searcher = searcher;

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/QueryDriver.java
Tue Nov 22 08:06:13 2011
@@ -17,15 +17,6 @@ package org.apache.lucene.benchmark.qual
  * limitations under the License.
  */
 
-import org.apache.lucene.benchmark.quality.trec.TrecJudge;
-import org.apache.lucene.benchmark.quality.trec.TrecTopicsReader;
-import org.apache.lucene.benchmark.quality.utils.SimpleQQParser;
-import org.apache.lucene.benchmark.quality.utils.SubmissionReport;
-import org.apache.lucene.benchmark.quality.*;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Searcher;
-import org.apache.lucene.store.FSDirectory;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
@@ -33,6 +24,16 @@ import java.io.PrintWriter;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.lucene.benchmark.quality.Judge;
+import org.apache.lucene.benchmark.quality.QualityBenchmark;
+import org.apache.lucene.benchmark.quality.QualityQuery;
+import org.apache.lucene.benchmark.quality.QualityQueryParser;
+import org.apache.lucene.benchmark.quality.QualityStats;
+import org.apache.lucene.benchmark.quality.utils.SimpleQQParser;
+import org.apache.lucene.benchmark.quality.utils.SubmissionReport;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.store.FSDirectory;
 
 /**
  *
@@ -55,8 +56,9 @@ public class QueryDriver {
     File qrelsFile = new File(args[1]);
     SubmissionReport submitLog = new SubmissionReport(new PrintWriter(args[2]), "lucene");
     FSDirectory dir = FSDirectory.open(new File(args[3]));
+    IndexReader r = IndexReader.open(dir, true);
+    IndexSearcher searcher = new IndexSearcher(r);
     String fieldSpec = args.length == 5 ? args[4] : "T"; // default to Title-only if not
specified.
-    Searcher searcher = new IndexSearcher(dir, true);
 
     int maxResults = 1000;
     String docNameField = "docname";
@@ -89,5 +91,10 @@ public class QueryDriver {
     // print an avarage sum of the results
     QualityStats avg = QualityStats.average(stats);
     avg.log("SUMMARY", 2, logger, "  ");
+    
+    searcher.close();
+    r.close();
+    dir.close();
   }
+  
 }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/TrecJudge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/TrecJudge.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/TrecJudge.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/trec/TrecJudge.java
Tue Nov 22 08:06:13 2011
@@ -90,7 +90,7 @@ public class TrecJudge implements Judge 
 
   /** single Judgement of a trec quality query */
   private static class QRelJudgement {
-    private String queryID;
+    String queryID;
     private HashMap<String,String> relevantDocs;
     
     QRelJudgement(String queryID) {

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/DocNameExtractor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/DocNameExtractor.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/DocNameExtractor.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/DocNameExtractor.java
Tue Nov 22 08:06:13 2011
@@ -20,7 +20,7 @@ import java.io.IOException;
 
 import org.apache.lucene.document.FieldSelector;
 import org.apache.lucene.document.FieldSelectorResult;
-import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.IndexSearcher;
 
 /**
  * Utility: extract doc names from an index
@@ -52,7 +52,7 @@ public class DocNameExtractor {
    * @return the name of the input doc as extracted from the index.
    * @throws IOException if cannot extract the doc name from the index.
    */
-  public String docName(Searcher searcher, int docid) throws IOException {
+  public String docName(IndexSearcher searcher, int docid) throws IOException {
     return searcher.doc(docid,fldSel).get(docNameField);
   }
   

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SubmissionReport.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SubmissionReport.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SubmissionReport.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/SubmissionReport.java
Tue Nov 22 08:06:13 2011
@@ -22,13 +22,13 @@ import java.text.NumberFormat;
 
 import org.apache.lucene.benchmark.quality.QualityQuery;
 import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TopDocs;
 
 /**
  * Create a log ready for submission.
  * Extend this class and override
- * {@link #report(QualityQuery, TopDocs, String, Searcher)}
+ * {@link #report(QualityQuery, TopDocs, String, IndexSearcher)}
  * to create different reports. 
  */
 public class SubmissionReport {
@@ -58,7 +58,7 @@ public class SubmissionReport {
    * @param searcher index access for fetching doc name.
    * @throws IOException in case of a problem.
    */
-  public void report(QualityQuery qq, TopDocs td, String docNameField, Searcher searcher)
throws IOException {
+  public void report(QualityQuery qq, TopDocs td, String docNameField, IndexSearcher searcher)
throws IOException {
     if (logger==null) {
       return;
     }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
Tue Nov 22 08:06:13 2011
@@ -20,7 +20,6 @@ package org.apache.lucene.benchmark.byTa
 import java.io.IOException;
 import java.util.Properties;
 
-import org.apache.lucene.analysis.SimpleAnalyzer;
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.benchmark.BenchmarkTestCase;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
@@ -30,6 +29,7 @@ import org.apache.lucene.benchmark.byTas
 import org.apache.lucene.benchmark.byTask.tasks.TaskSequence;
 import org.apache.lucene.benchmark.byTask.utils.Config;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TermQuery;
@@ -87,11 +87,14 @@ public class DocMakerTest extends Benchm
     tasks.addTask(new AddDocTask(runData));
     tasks.addTask(new CloseIndexTask(runData));
     tasks.doLogic();
+    tasks.close();
     
-    IndexSearcher searcher = new IndexSearcher(runData.getDirectory(), true);
+    IndexReader r = IndexReader.open(runData.getDirectory(), true);
+    IndexSearcher searcher = new IndexSearcher(r);
     TopDocs td = searcher.search(new TermQuery(new Term("key", "value")), 10);
     assertEquals(numExpectedResults, td.totalHits);
     searcher.close();
+    r.close();
   }
   
   private Document createTestNormsDocument(boolean setNormsProp,
@@ -137,28 +140,28 @@ public class DocMakerTest extends Benchm
     
     // Don't set anything, use the defaults
     doc = createTestNormsDocument(false, false, false, false);
-    assertTrue(doc.getField(DocMaker.TITLE_FIELD).getOmitNorms());
-    assertFalse(doc.getField(DocMaker.BODY_FIELD).getOmitNorms());
+    assertTrue(doc.getFieldable(DocMaker.TITLE_FIELD).getOmitNorms());
+    assertFalse(doc.getFieldable(DocMaker.BODY_FIELD).getOmitNorms());
     
     // Set norms to false
     doc = createTestNormsDocument(true, false, false, false);
-    assertTrue(doc.getField(DocMaker.TITLE_FIELD).getOmitNorms());
-    assertFalse(doc.getField(DocMaker.BODY_FIELD).getOmitNorms());
+    assertTrue(doc.getFieldable(DocMaker.TITLE_FIELD).getOmitNorms());
+    assertFalse(doc.getFieldable(DocMaker.BODY_FIELD).getOmitNorms());
     
     // Set norms to true
     doc = createTestNormsDocument(true, true, false, false);
-    assertFalse(doc.getField(DocMaker.TITLE_FIELD).getOmitNorms());
-    assertFalse(doc.getField(DocMaker.BODY_FIELD).getOmitNorms());
+    assertFalse(doc.getFieldable(DocMaker.TITLE_FIELD).getOmitNorms());
+    assertFalse(doc.getFieldable(DocMaker.BODY_FIELD).getOmitNorms());
     
     // Set body norms to false
     doc = createTestNormsDocument(false, false, true, false);
-    assertTrue(doc.getField(DocMaker.TITLE_FIELD).getOmitNorms());
-    assertTrue(doc.getField(DocMaker.BODY_FIELD).getOmitNorms());
+    assertTrue(doc.getFieldable(DocMaker.TITLE_FIELD).getOmitNorms());
+    assertTrue(doc.getFieldable(DocMaker.BODY_FIELD).getOmitNorms());
     
     // Set body norms to true
     doc = createTestNormsDocument(false, false, true, true);
-    assertTrue(doc.getField(DocMaker.TITLE_FIELD).getOmitNorms());
-    assertFalse(doc.getField(DocMaker.BODY_FIELD).getOmitNorms());
+    assertTrue(doc.getFieldable(DocMaker.TITLE_FIELD).getOmitNorms());
+    assertFalse(doc.getFieldable(DocMaker.BODY_FIELD).getOmitNorms());
   }
   
 }

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java
Tue Nov 22 08:06:13 2011
@@ -156,6 +156,7 @@ public class LineDocSourceTest extends B
     assertEquals("Wrong field value", storedField, searcher.doc(0).get(storedField));
 
     searcher.close();
+    r.close();
   }
   
   /* Tests LineDocSource with a bzip2 input stream. */

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/StreamUtilsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/StreamUtilsTest.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/StreamUtilsTest.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/StreamUtilsTest.java
Tue Nov 22 08:06:13 2011
@@ -132,6 +132,7 @@ public class StreamUtilsTest extends Ben
     r.close();
   }
   
+  @Override
   @Before
   public void setUp() throws Exception {
     super.setUp();
@@ -140,6 +141,7 @@ public class StreamUtilsTest extends Ben
     assertTrue(testDir.mkdirs());
   }
 
+  @Override
   @After
   public void tearDown() throws Exception {
     _TestUtil.rmDir(testDir);

Modified: lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/quality/TestQualityRun.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/quality/TestQualityRun.java?rev=1204850&r1=1204849&r2=1204850&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/quality/TestQualityRun.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/quality/TestQualityRun.java
Tue Nov 22 08:06:13 2011
@@ -22,6 +22,7 @@ import org.apache.lucene.benchmark.quali
 import org.apache.lucene.benchmark.quality.trec.TrecTopicsReader;
 import org.apache.lucene.benchmark.quality.utils.SimpleQQParser;
 import org.apache.lucene.benchmark.quality.utils.SubmissionReport;
+import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.store.Directory;
 
@@ -68,7 +69,8 @@ public class TestQualityRun extends Benc
     judge.validateData(qqs, logger);
     
     Directory dir = newFSDirectory(new File(getWorkDir(),"index"));
-    IndexSearcher searcher = new IndexSearcher(dir, true);
+    IndexReader r = IndexReader.open(dir, true);
+    IndexSearcher searcher = newSearcher(r);
 
     QualityQueryParser qqParser = new SimpleQQParser("title","body");
     QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
@@ -134,6 +136,7 @@ public class TestQualityRun extends Benc
     }
     
     searcher.close();
+    r.close();
     dir.close();
   }
   



Mime
View raw message