lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r832972 [2/3] - in /lucene/java/trunk/src/test/org/apache/lucene: ./ analysis/ index/ queryParser/ search/ search/function/ search/payloads/ search/spans/ store/ util/
Date Thu, 05 Nov 2009 01:55:44 GMT
Modified: lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java Thu Nov  5 01:55:39 2009
@@ -40,82 +40,101 @@
 
   static final class JustCompileSearcher extends Searcher {
 
+    @Override
     protected Weight createWeight(Query query) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public void close() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Document doc(int i) throws CorruptIndexException, IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int[] docFreqs(Term[] terms) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Explanation explain(Query query, int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Similarity getSimilarity() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void search(Query query, Collector results) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void search(Query query, Filter filter, Collector results)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public TopDocs search(Query query, Filter filter, int n) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public TopFieldDocs search(Query query, Filter filter, int n, Sort sort)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public TopDocs search(Query query, int n) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public void setSimilarity(Similarity similarity) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public int docFreq(Term term) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Explanation explain(Weight weight, int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int maxDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Query rewrite(Query query) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void search(Weight weight, Filter filter, Collector results)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public TopDocs search(Weight weight, Filter filter, int n)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public TopFieldDocs search(Weight weight, Filter filter, int n, Sort sort)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
@@ -130,19 +149,23 @@
   
   static final class JustCompileCollector extends Collector {
 
+    @Override
     public void collect(int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setNextReader(IndexReader reader, int docBase)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setScorer(Scorer scorer) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -151,6 +174,7 @@
   
   static final class JustCompileDocIdSet extends DocIdSet {
 
+    @Override
     public DocIdSetIterator iterator() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -159,14 +183,17 @@
 
   static final class JustCompileDocIdSetIterator extends DocIdSetIterator {
 
+    @Override
     public int docID() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int nextDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public int advance(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -190,27 +217,33 @@
 
   static final class JustCompileFieldComparator extends FieldComparator {
 
+    @Override
     public int compare(int slot1, int slot2) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int compareBottom(int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void copy(int slot, int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setBottom(int slot) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setNextReader(IndexReader reader, int docBase)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Comparable value(int slot) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -219,6 +252,7 @@
 
   static final class JustCompileFieldComparatorSource extends FieldComparatorSource {
 
+    @Override
     public FieldComparator newComparator(String fieldname, int numHits,
         int sortPos, boolean reversed) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
@@ -242,6 +276,7 @@
       super(innerSet);
     }
 
+    @Override
     protected boolean match(int docid) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -254,6 +289,7 @@
       super(innerIter);
     }
 
+    @Override
     protected boolean match(int doc) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -262,14 +298,17 @@
 
   static final class JustCompileFilteredTermEnum extends FilteredTermEnum {
 
+    @Override
     public float difference() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     protected boolean endEnum() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     protected boolean termCompare(Term term) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -283,6 +322,7 @@
       super(weight, tps, offsets, similarity, norms);
     }
 
+    @Override
     protected float phraseFreq() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -291,6 +331,7 @@
 
   static final class JustCompileQuery extends Query {
 
+    @Override
     public String toString(String field) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -303,23 +344,28 @@
       super(similarity);
     }
 
+    @Override
     protected boolean score(Collector collector, int max, int firstDocID)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public float score() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int docID() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int nextDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public int advance(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -327,26 +373,32 @@
   
   static final class JustCompileSimilarity extends Similarity {
 
+    @Override
     public float coord(int overlap, int maxOverlap) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float idf(int docFreq, int numDocs) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float lengthNorm(String fieldName, int numTokens) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float queryNorm(float sumOfSquaredWeights) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float sloppyFreq(int distance) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float tf(float freq) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -355,6 +407,7 @@
 
   static final class JustCompileSpanFilter extends SpanFilter {
 
+    @Override
     public SpanFilterResult bitSpans(IndexReader reader) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -371,19 +424,23 @@
       super(pq);
     }
 
+    @Override
     public void collect(int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setNextReader(IndexReader reader, int docBase)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void setScorer(Scorer scorer) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
     
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -392,26 +449,32 @@
 
   static final class JustCompileWeight extends Weight {
 
+    @Override
     public Explanation explain(IndexReader reader, int doc) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Query getQuery() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float getValue() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public void normalize(float norm) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public float sumOfSquaredWeights() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/MockFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/MockFilter.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/MockFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/MockFilter.java Thu Nov  5 01:55:39 2009
@@ -24,6 +24,7 @@
 public class MockFilter extends Filter {
   private boolean wasCalled;
 
+  @Override
   public DocIdSet getDocIdSet(IndexReader reader) {
     wasCalled = true;
     return new DocIdBitSet(new BitSet());

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/QueryUtils.java Thu Nov  5 01:55:39 2009
@@ -56,6 +56,7 @@
     // test that a class check is done so that no exception is thrown
     // in the implementation of equals()
     Query whacky = new Query() {
+      @Override
       public String toString(String field) {
         return "My Whacky Query";
       }
@@ -287,10 +288,12 @@
           private IndexReader reader;
           private Scorer scorer;
 
+          @Override
           public void setScorer(Scorer scorer) throws IOException {
             this.sc = scorer;
           }
 
+          @Override
           public void collect(int doc) throws IOException {
             float score = sc.score();
             lastDoc[0] = doc;
@@ -334,12 +337,14 @@
             }
           }
 
+          @Override
           public void setNextReader(IndexReader reader, int docBase) {
             this.reader = reader;
             this.scorer = null;
             lastDoc[0] = -1;
           }
 
+          @Override
           public boolean acceptsDocsOutOfOrder() {
             return true;
           }
@@ -371,9 +376,11 @@
     s.search(q,new Collector() {
       private Scorer scorer;
       private IndexReader reader;
+      @Override
       public void setScorer(Scorer scorer) throws IOException {
         this.scorer = scorer;
       }
+      @Override
       public void collect(int doc) throws IOException {
         //System.out.println("doc="+doc);
         float score = scorer.score();
@@ -393,10 +400,12 @@
           throw new RuntimeException(e);
         }
       }
+      @Override
       public void setNextReader(IndexReader reader, int docBase) {
         this.reader = reader;
         lastDoc[0] = -1;
       }
+      @Override
       public boolean acceptsDocsOutOfOrder() {
         return false;
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/SingleDocTestFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/SingleDocTestFilter.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/SingleDocTestFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/SingleDocTestFilter.java Thu Nov  5 01:55:39 2009
@@ -30,6 +30,7 @@
     this.doc = doc;
   }
 
+  @Override
   public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
     BitSet bits = new BitSet(reader.maxDoc());
     bits.set(doc);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBoolean2.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBoolean2.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBoolean2.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBoolean2.java Thu Nov  5 01:55:39 2009
@@ -47,6 +47,7 @@
   private Directory dir2;
   private int mulFactor;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();
@@ -92,6 +93,7 @@
     bigSearcher = new IndexSearcher(reader);
   }
 
+  @Override
   public void tearDown() throws Exception {
     reader.close();
     dir2.close();
@@ -187,6 +189,7 @@
     String queryText = "+w3 +xx +w2 zz";
     int[] expDocNrs = {2, 3};
     searcher.setSimilarity(new DefaultSimilarity(){
+      @Override
       public float coord(int overlap, int maxOverlap) {
         return overlap / ((float)maxOverlap - 1);
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java Thu Nov  5 01:55:39 2009
@@ -41,6 +41,7 @@
     public IndexReader r;
     public IndexSearcher s;
 
+    @Override
     public void setUp() throws Exception {
         super.setUp();
 

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanOr.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanOr.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanOr.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanOr.java Thu Nov  5 01:55:39 2009
@@ -33,128 +33,128 @@
 
 public class TestBooleanOr extends LuceneTestCase {
 
-	private static String FIELD_T = "T";
-	private static String FIELD_C = "C";
+  private static String FIELD_T = "T";
+  private static String FIELD_C = "C";
 
-	private TermQuery t1 = new TermQuery(new Term(FIELD_T, "files"));
-	private TermQuery t2 = new TermQuery(new Term(FIELD_T, "deleting"));
-	private TermQuery c1 = new TermQuery(new Term(FIELD_C, "production"));
-	private TermQuery c2 = new TermQuery(new Term(FIELD_C, "optimize"));
+  private TermQuery t1 = new TermQuery(new Term(FIELD_T, "files"));
+  private TermQuery t2 = new TermQuery(new Term(FIELD_T, "deleting"));
+  private TermQuery c1 = new TermQuery(new Term(FIELD_C, "production"));
+  private TermQuery c2 = new TermQuery(new Term(FIELD_C, "optimize"));
 
-	private IndexSearcher searcher = null;
+  private IndexSearcher searcher = null;
 
-	private int search(Query q) throws IOException {
+  private int search(Query q) throws IOException {
     QueryUtils.check(q,searcher);
     return searcher.search(q, null, 1000).totalHits;
-	}
+  }
 
-	public void testElements() throws IOException {
-		assertEquals(1, search(t1));
-		assertEquals(1, search(t2));
-		assertEquals(1, search(c1));
-		assertEquals(1, search(c2));
-	}
-
-	/**
-	 * <code>T:files T:deleting C:production C:optimize </code>
-	 * it works.
-	 *
-	 * @throws IOException
-	 */
-	public void testFlat() throws IOException {
-		BooleanQuery q = new BooleanQuery();
-		q.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
-		q.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
-		q.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
-		q.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
-		assertEquals(1, search(q));
-	}
-
-	/**
-	 * <code>(T:files T:deleting) (+C:production +C:optimize)</code>
-	 * it works.
-	 *
-	 * @throws IOException
-	 */
-	public void testParenthesisMust() throws IOException {
-		BooleanQuery q3 = new BooleanQuery();
-		q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
-		q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
-		BooleanQuery q4 = new BooleanQuery();
-		q4.add(new BooleanClause(c1, BooleanClause.Occur.MUST));
-		q4.add(new BooleanClause(c2, BooleanClause.Occur.MUST));
-		BooleanQuery q2 = new BooleanQuery();
-		q2.add(q3, BooleanClause.Occur.SHOULD);
-		q2.add(q4, BooleanClause.Occur.SHOULD);
-		assertEquals(1, search(q2));
-	}
-
-	/**
-	 * <code>(T:files T:deleting) +(C:production C:optimize)</code>
-	 * not working. results NO HIT.
-	 *
-	 * @throws IOException
-	 */
-	public void testParenthesisMust2() throws IOException {
-		BooleanQuery q3 = new BooleanQuery();
-		q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
-		q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
-		BooleanQuery q4 = new BooleanQuery();
-		q4.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
-		q4.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
-		BooleanQuery q2 = new BooleanQuery();
-		q2.add(q3, BooleanClause.Occur.SHOULD);
-		q2.add(q4, BooleanClause.Occur.MUST);
-		assertEquals(1, search(q2));
-	}
-
-	/**
-	 * <code>(T:files T:deleting) (C:production C:optimize)</code>
-	 * not working. results NO HIT.
-	 *
-	 * @throws IOException
-	 */
-	public void testParenthesisShould() throws IOException {
-		BooleanQuery q3 = new BooleanQuery();
-		q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
-		q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
-		BooleanQuery q4 = new BooleanQuery();
-		q4.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
-		q4.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
-		BooleanQuery q2 = new BooleanQuery();
-		q2.add(q3, BooleanClause.Occur.SHOULD);
-		q2.add(q4, BooleanClause.Occur.SHOULD);
-		assertEquals(1, search(q2));
-	}
-
-	protected void setUp() throws Exception {
-		super.setUp();
-		super.setUp();
-
-		//
-		RAMDirectory rd = new RAMDirectory();
-
-		//
-		IndexWriter writer = new IndexWriter(rd, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
-
-		//
-		Document d = new Document();
-		d.add(new Field(
-				FIELD_T,
-				"Optimize not deleting all files",
-				Field.Store.YES,
-				Field.Index.ANALYZED));
-		d.add(new Field(
-				FIELD_C,
-				"Deleted When I run an optimize in our production environment.",
-				Field.Store.YES,
-				Field.Index.ANALYZED));
-
-		//
-		writer.addDocument(d);
-		writer.close();
-
-		//
-		searcher = new IndexSearcher(rd, true);
-	}
+  public void testElements() throws IOException {
+    assertEquals(1, search(t1));
+    assertEquals(1, search(t2));
+    assertEquals(1, search(c1));
+    assertEquals(1, search(c2));
+  }
+
+  /**
+   * <code>T:files T:deleting C:production C:optimize </code>
+   * it works.
+   *
+   * @throws IOException
+   */
+  public void testFlat() throws IOException {
+    BooleanQuery q = new BooleanQuery();
+    q.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
+    q.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
+    q.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
+    q.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
+    assertEquals(1, search(q));
+  }
+
+  /**
+   * <code>(T:files T:deleting) (+C:production +C:optimize)</code>
+   * it works.
+   *
+   * @throws IOException
+   */
+  public void testParenthesisMust() throws IOException {
+    BooleanQuery q3 = new BooleanQuery();
+    q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
+    q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
+    BooleanQuery q4 = new BooleanQuery();
+    q4.add(new BooleanClause(c1, BooleanClause.Occur.MUST));
+    q4.add(new BooleanClause(c2, BooleanClause.Occur.MUST));
+    BooleanQuery q2 = new BooleanQuery();
+    q2.add(q3, BooleanClause.Occur.SHOULD);
+    q2.add(q4, BooleanClause.Occur.SHOULD);
+    assertEquals(1, search(q2));
+  }
+
+  /**
+   * <code>(T:files T:deleting) +(C:production C:optimize)</code>
+   * not working. results NO HIT.
+   *
+   * @throws IOException
+   */
+  public void testParenthesisMust2() throws IOException {
+    BooleanQuery q3 = new BooleanQuery();
+    q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
+    q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
+    BooleanQuery q4 = new BooleanQuery();
+    q4.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
+    q4.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
+    BooleanQuery q2 = new BooleanQuery();
+    q2.add(q3, BooleanClause.Occur.SHOULD);
+    q2.add(q4, BooleanClause.Occur.MUST);
+    assertEquals(1, search(q2));
+  }
+
+  /**
+   * <code>(T:files T:deleting) (C:production C:optimize)</code>
+   * not working. results NO HIT.
+   *
+   * @throws IOException
+   */
+  public void testParenthesisShould() throws IOException {
+    BooleanQuery q3 = new BooleanQuery();
+    q3.add(new BooleanClause(t1, BooleanClause.Occur.SHOULD));
+    q3.add(new BooleanClause(t2, BooleanClause.Occur.SHOULD));
+    BooleanQuery q4 = new BooleanQuery();
+    q4.add(new BooleanClause(c1, BooleanClause.Occur.SHOULD));
+    q4.add(new BooleanClause(c2, BooleanClause.Occur.SHOULD));
+    BooleanQuery q2 = new BooleanQuery();
+    q2.add(q3, BooleanClause.Occur.SHOULD);
+    q2.add(q4, BooleanClause.Occur.SHOULD);
+    assertEquals(1, search(q2));
+  }
+
+  @Override
+  protected void setUp() throws Exception {
+    super.setUp();
+
+    //
+    RAMDirectory rd = new RAMDirectory();
+
+    //
+    IndexWriter writer = new IndexWriter(rd, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
+
+    //
+    Document d = new Document();
+    d.add(new Field(
+        FIELD_T,
+        "Optimize not deleting all files",
+        Field.Store.YES,
+        Field.Index.ANALYZED));
+    d.add(new Field(
+        FIELD_C,
+        "Deleted When I run an optimize in our production environment.",
+        Field.Store.YES,
+        Field.Index.ANALYZED));
+
+    //
+    writer.addDocument(d);
+    writer.close();
+
+    //
+    searcher = new IndexSearcher(rd, true);
+  }
 }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java Thu Nov  5 01:55:39 2009
@@ -84,6 +84,7 @@
     assertDocIdSetCacheable(reader, FieldCacheRangeFilter.newIntRange("test", Integer.valueOf(10), Integer.valueOf(20), true, true), true);
     // a openbitset filter is always cacheable
     assertDocIdSetCacheable(reader, new Filter() {
+      @Override
       public DocIdSet getDocIdSet(IndexReader reader) {
         return new OpenBitSet();
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanations.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanations.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanations.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanations.java Thu Nov  5 01:55:39 2009
@@ -31,6 +31,7 @@
    * Override the Similarity used in our searcher with one that plays
    * nice with boosts of 0.0
    */
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     searcher.setSimilarity(createQnorm1Similarity());
@@ -39,6 +40,7 @@
   // must be static for weight serialization tests 
   private static DefaultSimilarity createQnorm1Similarity() {
     return new DefaultSimilarity() {
+        @Override
         public float queryNorm(float sumOfSquaredWeights) {
           return 1.0f; // / (float) Math.sqrt(1.0f + sumOfSquaredWeights);
         }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanationsOfNonMatches.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanationsOfNonMatches.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanationsOfNonMatches.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestComplexExplanationsOfNonMatches.java Thu Nov  5 01:55:39 2009
@@ -48,6 +48,7 @@
    *
    * @see CheckHits#checkNoMatchExplanations
    */
+  @Override
   public void qtest(Query q, int[] expDocNrs) throws Exception {
     CheckHits.checkNoMatchExplanations(q, FIELD, searcher, expDocNrs);
   }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestCustomSearcherSort.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestCustomSearcherSort.java Thu Nov  5 01:55:39 2009
@@ -53,105 +53,106 @@
     // reduced from 20000 to 2000 to speed up test...
     private final static int INDEX_SIZE = 2000;
 
-	public TestCustomSearcherSort (String name) {
-		super (name);
-	}
-
-	public static void main (String[] argv) {
-	    TestRunner.run (suite());
-	}
-
-	public static Test suite() {
-		return new TestSuite (TestCustomSearcherSort.class);
-	}
-
-
-	// create an index for testing
-	private Directory getIndex()
-	throws IOException {
-	        RAMDirectory indexStore = new RAMDirectory ();
-	        IndexWriter writer = new IndexWriter (indexStore, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
-	        RandomGen random = new RandomGen(newRandom());
-	        for (int i=0; i<INDEX_SIZE; ++i) { // don't decrease; if to low the problem doesn't show up
-	        Document doc = new Document();
-	            if((i%5)!=0) { // some documents must not have an entry in the first sort field
-	                doc.add (new Field("publicationDate_", random.getLuceneDate(), Field.Store.YES, Field.Index.NOT_ANALYZED));
-	            }
-	            if((i%7)==0) { // some documents to match the query (see below) 
-	                doc.add (new Field("content", "test", Field.Store.YES, Field.Index.ANALYZED));
-	            }
-	            // every document has a defined 'mandant' field
-	            doc.add(new Field("mandant", Integer.toString(i%3), Field.Store.YES, Field.Index.NOT_ANALYZED));
-	            writer.addDocument (doc);
-	        }
-	        writer.optimize ();
-	        writer.close ();
-	    return indexStore;
-	}
-
-	/**
-	 * Create index and query for test cases. 
-	 */
-	public void setUp() throws Exception {
+  public TestCustomSearcherSort (String name) {
+    super (name);
+  }
+
+  public static void main (String[] argv) {
+      TestRunner.run (suite());
+  }
+
+  public static Test suite() {
+    return new TestSuite (TestCustomSearcherSort.class);
+  }
+
+
+  // create an index for testing
+  private Directory getIndex()
+  throws IOException {
+          RAMDirectory indexStore = new RAMDirectory ();
+          IndexWriter writer = new IndexWriter (indexStore, new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
+          RandomGen random = new RandomGen(newRandom());
+          for (int i=0; i<INDEX_SIZE; ++i) { // don't decrease; if to low the problem doesn't show up
+          Document doc = new Document();
+              if((i%5)!=0) { // some documents must not have an entry in the first sort field
+                  doc.add (new Field("publicationDate_", random.getLuceneDate(), Field.Store.YES, Field.Index.NOT_ANALYZED));
+              }
+              if((i%7)==0) { // some documents to match the query (see below) 
+                  doc.add (new Field("content", "test", Field.Store.YES, Field.Index.ANALYZED));
+              }
+              // every document has a defined 'mandant' field
+              doc.add(new Field("mandant", Integer.toString(i%3), Field.Store.YES, Field.Index.NOT_ANALYZED));
+              writer.addDocument (doc);
+          }
+          writer.optimize ();
+          writer.close ();
+      return indexStore;
+  }
+
+  /**
+   * Create index and query for test cases. 
+   */
+  @Override
+  public void setUp() throws Exception {
           super.setUp();
           index = getIndex();
           query = new TermQuery( new Term("content", "test"));
-	}
+  }
 
-	/**
-	 * Run the test using two CustomSearcher instances. 
-	 */
-	public void testFieldSortCustomSearcher() throws Exception {
-	  // log("Run testFieldSortCustomSearcher");
-		// define the sort criteria
-	    Sort custSort = new Sort(
-	            new SortField("publicationDate_", SortField.STRING), 
-	            SortField.FIELD_SCORE
-	    );
-	    Searcher searcher = new CustomSearcher (index, 2);
-	    // search and check hits
-		matchHits(searcher, custSort);
-	}
-	/**
-	 * Run the test using one CustomSearcher wrapped by a MultiSearcher. 
-	 */
-	public void testFieldSortSingleSearcher() throws Exception {
-	  // log("Run testFieldSortSingleSearcher");
-		// define the sort criteria
-	    Sort custSort = new Sort(
-	            new SortField("publicationDate_", SortField.STRING), 
-	            SortField.FIELD_SCORE
-	    );
-	    Searcher searcher = new MultiSearcher(new Searcher[] { new CustomSearcher(
+  /**
+   * Run the test using two CustomSearcher instances. 
+   */
+  public void testFieldSortCustomSearcher() throws Exception {
+    // log("Run testFieldSortCustomSearcher");
+    // define the sort criteria
+      Sort custSort = new Sort(
+              new SortField("publicationDate_", SortField.STRING), 
+              SortField.FIELD_SCORE
+      );
+      Searcher searcher = new CustomSearcher (index, 2);
+      // search and check hits
+    matchHits(searcher, custSort);
+  }
+  /**
+   * Run the test using one CustomSearcher wrapped by a MultiSearcher. 
+   */
+  public void testFieldSortSingleSearcher() throws Exception {
+    // log("Run testFieldSortSingleSearcher");
+    // define the sort criteria
+      Sort custSort = new Sort(
+              new SortField("publicationDate_", SortField.STRING), 
+              SortField.FIELD_SCORE
+      );
+      Searcher searcher = new MultiSearcher(new Searcher[] { new CustomSearcher(
         index, 2) });
-	    // search and check hits
-		matchHits(searcher, custSort);
-	}
-	/**
-	 * Run the test using two CustomSearcher instances. 
-	 */
-	public void testFieldSortMultiCustomSearcher() throws Exception {
-	  // log("Run testFieldSortMultiCustomSearcher");
-		// define the sort criteria
-	    Sort custSort = new Sort(
-	            new SortField("publicationDate_", SortField.STRING), 
-	            SortField.FIELD_SCORE
-	    );
-	    Searcher searcher = 
-	        new MultiSearcher(new Searchable[] {
-	                new CustomSearcher (index, 0),
-	                new CustomSearcher (index, 2)});
-	    // search and check hits
-		matchHits(searcher, custSort);
-	}
-
-
-	// make sure the documents returned by the search match the expected list
-	private void matchHits (Searcher searcher, Sort sort)
-	throws IOException {
-	    // make a query without sorting first
+      // search and check hits
+    matchHits(searcher, custSort);
+  }
+  /**
+   * Run the test using two CustomSearcher instances. 
+   */
+  public void testFieldSortMultiCustomSearcher() throws Exception {
+    // log("Run testFieldSortMultiCustomSearcher");
+    // define the sort criteria
+      Sort custSort = new Sort(
+              new SortField("publicationDate_", SortField.STRING), 
+              SortField.FIELD_SCORE
+      );
+      Searcher searcher = 
+          new MultiSearcher(new Searchable[] {
+                  new CustomSearcher (index, 0),
+                  new CustomSearcher (index, 2)});
+      // search and check hits
+    matchHits(searcher, custSort);
+  }
+
+
+  // make sure the documents returned by the search match the expected list
+  private void matchHits (Searcher searcher, Sort sort)
+  throws IOException {
+      // make a query without sorting first
     ScoreDoc[] hitsByRank = searcher.search(query, null, 1000).scoreDocs;
-		checkHits(hitsByRank, "Sort by rank: "); // check for duplicates
+    checkHits(hitsByRank, "Sort by rank: "); // check for duplicates
         Map resultMap = new TreeMap();
         // store hits in TreeMap - TreeMap does not allow duplicates; existing entries are silently overwritten
         for(int hitid=0;hitid<hitsByRank.length; ++hitid) {
@@ -162,8 +163,8 @@
         
         // now make a query using the sort criteria
     ScoreDoc[] resultSort = searcher.search (query, null, 1000, sort).scoreDocs;
-		checkHits(resultSort, "Sort by custom criteria: "); // check for duplicates
-		
+    checkHits(resultSort, "Sort by custom criteria: "); // check for duplicates
+    
         // besides the sorting both sets of hits must be identical
         for(int hitid=0;hitid<resultSort.length; ++hitid) {
             Integer idHitDate = Integer.valueOf(resultSort[hitid].doc); // document ID from sorted search
@@ -181,12 +182,12 @@
         log("Couldn't match "+resultMap.size()+" hits.");
         }
         assertEquals(resultMap.size(), 0);
-	}
+  }
 
-	/**
-	 * Check the hits for duplicates.
-	 * @param hits
-	 */
+  /**
+   * Check the hits for duplicates.
+   * @param hits
+   */
     private void checkHits(ScoreDoc[] hits, String prefix) {
         if(hits!=null) {
             Map idMap = new TreeMap();
@@ -235,6 +236,7 @@
         /* (non-Javadoc)
          * @see org.apache.lucene.search.Searchable#search(org.apache.lucene.search.Query, org.apache.lucene.search.Filter, int, org.apache.lucene.search.Sort)
          */
+        @Override
         public TopFieldDocs search(Query query, Filter filter, int nDocs,
                 Sort sort) throws IOException {
             BooleanQuery bq = new BooleanQuery();
@@ -245,6 +247,7 @@
         /* (non-Javadoc)
          * @see org.apache.lucene.search.Searchable#search(org.apache.lucene.search.Query, org.apache.lucene.search.Filter, int)
          */
+        @Override
         public TopDocs search(Query query, Filter filter, int nDocs)
         throws IOException {
             BooleanQuery bq = new BooleanQuery();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java Thu Nov  5 01:55:39 2009
@@ -46,6 +46,7 @@
 
   private static Directory directory;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     // Create an index writer.

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java Thu Nov  5 01:55:39 2009
@@ -53,13 +53,16 @@
 
         public TestSimilarity() {
         }
+        @Override
         public float tf(float freq) {
             if (freq > 0.0f) return 1.0f;
             else return 0.0f;
         }
+        @Override
         public float lengthNorm(String fieldName, int numTerms) {
             return 1.0f;
         }
+        @Override
         public float idf(int docFreq, int numDocs) {
             return 1.0f;
         }
@@ -70,6 +73,7 @@
     public IndexReader r;
     public IndexSearcher s;
 
+    @Override
     public void setUp() throws Exception {
         super.setUp();
 

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDocBoost.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDocBoost.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDocBoost.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDocBoost.java Thu Nov  5 01:55:39 2009
@@ -71,15 +71,19 @@
        new Collector() {
          private int base = 0;
          private Scorer scorer;
+         @Override
          public void setScorer(Scorer scorer) throws IOException {
           this.scorer = scorer;
          }
+         @Override
          public final void collect(int doc) throws IOException {
            scores[doc + base] = scorer.score();
          }
+         @Override
          public void setNextReader(IndexReader reader, int docBase) {
            base = docBase;
          }
+         @Override
          public boolean acceptsDocsOutOfOrder() {
            return true;
          }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java Thu Nov  5 01:55:39 2009
@@ -48,6 +48,7 @@
 
             int docid = -1;
             
+            @Override
             public int docID() {
               return docid;
             }
@@ -116,6 +117,7 @@
     
     // Now search w/ a Filter which returns a null DocIdSet
     Filter f = new Filter() {
+      @Override
       public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
         return null;
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java Thu Nov  5 01:55:39 2009
@@ -130,19 +130,22 @@
 
   public ElevationComparatorSource(final Map/*<String, Integer>*/ boosts) {
    this.priority = boosts;
- }
+  }
 
- public FieldComparator newComparator(final String fieldname, final int numHits, int sortPos, boolean reversed) throws IOException {
+  @Override
+  public FieldComparator newComparator(final String fieldname, final int numHits, int sortPos, boolean reversed) throws IOException {
    return new FieldComparator() {
 
      FieldCache.StringIndex idIndex;
      private final int[] values = new int[numHits];
      int bottomVal;
 
+     @Override
      public int compare(int slot1, int slot2) {
        return values[slot2] - values[slot1];  // values will be small enough that there is no overflow concern
      }
 
+     @Override
      public void setBottom(int slot) {
        bottomVal = values[slot];
      }
@@ -153,18 +156,22 @@
        return prio == null ? 0 : prio.intValue();
      }
 
+     @Override
      public int compareBottom(int doc) throws IOException {
        return docVal(doc) - bottomVal;
      }
 
+     @Override
      public void copy(int slot, int doc) throws IOException {
        values[slot] = docVal(doc);
      }
 
+     @Override
      public void setNextReader(IndexReader reader, int docBase) throws IOException {
        idIndex = FieldCache.DEFAULT.getStringIndex(reader, fieldname);
      }
 
+     @Override
      public Comparable value(int slot) {
        return Integer.valueOf(values[slot]);
      }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestExplanations.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestExplanations.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestExplanations.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestExplanations.java Thu Nov  5 01:55:39 2009
@@ -54,11 +54,13 @@
   public static final QueryParser qp =
     new QueryParser(Version.LUCENE_CURRENT, FIELD, new WhitespaceAnalyzer());
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     searcher.close();
   }
   
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCache.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCache.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCache.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCache.java Thu Nov  5 01:55:39 2009
@@ -36,6 +36,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java Thu Nov  5 01:55:39 2009
@@ -45,6 +45,7 @@
   private Query query;
   private Filter filter;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     directory = new RAMDirectory();
@@ -81,6 +82,7 @@
   // must be static for serialization tests
   private static Filter newStaticFilterB() {
     return new Filter() {
+      @Override
       public DocIdSet getDocIdSet (IndexReader reader) {
         BitSet bitset = new BitSet(5);
         bitset.set (1);
@@ -90,6 +92,7 @@
     };
   }
 
+  @Override
   public void tearDown()
   throws Exception {
     searcher.close();
@@ -150,6 +153,7 @@
   // must be static for serialization tests 
   private static Filter newStaticFilterA() {
     return new Filter() {
+      @Override
       public DocIdSet getDocIdSet (IndexReader reader) {
         BitSet bitset = new BitSet(5);
         bitset.set(0, 5);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java Thu Nov  5 01:55:39 2009
@@ -84,6 +84,7 @@
       
     }
 
+    @Override
     public DocIdSet getDocIdSet(IndexReader reader) {
       return bits;
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcher.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcher.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcher.java Thu Nov  5 01:55:39 2009
@@ -367,11 +367,17 @@
         
         Similarity customSimilarity = new DefaultSimilarity() {
             // overide all
+            @Override
             public float idf(int docFreq, int numDocs) { return 100.0f; }
+            @Override
             public float coord(int overlap, int maxOverlap) { return 1.0f; }
+            @Override
             public float lengthNorm(String fieldName, int numTokens) { return 1.0f; }
+            @Override
             public float queryNorm(float sumOfSquaredWeights) { return 1.0f; }
+            @Override
             public float sloppyFreq(int distance) { return 1.0f; }
+            @Override
             public float tf(float freq) { return 1.0f; }
         };
         

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcherRanking.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcherRanking.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcherRanking.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiSearcherRanking.java Thu Nov  5 01:55:39 2009
@@ -110,6 +110,7 @@
   /**
    * initializes multiSearcher and singleSearcher with the same document set
    */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     // create MultiSearcher from two seperate searchers

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java Thu Nov  5 01:55:39 2009
@@ -56,6 +56,7 @@
     Assert.assertEquals(m, e, a);
   }
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
 
@@ -185,15 +186,19 @@
     search.search(q, null, new Collector() {
       private int base = 0;
       private Scorer scorer;
+      @Override
       public void setScorer(Scorer scorer) throws IOException {
         this.scorer = scorer;
       }
+      @Override
       public void collect(int doc) throws IOException {
         assertEquals("score for doc " + (doc + base) + " was not correct", 1.0f, scorer.score());
       }
+      @Override
       public void setNextReader(IndexReader reader, int docBase) {
         base = docBase;
       }
+      @Override
       public boolean acceptsDocsOutOfOrder() {
         return true;
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java Thu Nov  5 01:55:39 2009
@@ -37,6 +37,7 @@
     super(s);
   }
   
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     IndexWriter writer

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestParallelMultiSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestParallelMultiSearcher.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestParallelMultiSearcher.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestParallelMultiSearcher.java Thu Nov  5 01:55:39 2009
@@ -24,13 +24,14 @@
  */
 public class TestParallelMultiSearcher extends TestMultiSearcher {
 
-	public TestParallelMultiSearcher(String name) {
-		super(name);
-	}
+  public TestParallelMultiSearcher(String name) {
+    super(name);
+  }
 
-	protected MultiSearcher getMultiSearcherInstance(Searcher[] searchers)
-		throws IOException {
-		return new ParallelMultiSearcher(searchers);
-	}
+  @Override
+  protected MultiSearcher getMultiSearcherInstance(Searcher[] searchers)
+    throws IOException {
+    return new ParallelMultiSearcher(searchers);
+  }
 
 }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestPhraseQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestPhraseQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestPhraseQuery.java Thu Nov  5 01:55:39 2009
@@ -44,14 +44,17 @@
   private PhraseQuery query;
   private RAMDirectory directory;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     directory = new RAMDirectory();
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new WhitespaceTokenizer(reader);
       }
 
+      @Override
       public int getPositionIncrementGap(String fieldName) {
         return 100;
       }
@@ -82,6 +85,7 @@
     query = new PhraseQuery();
   }
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     searcher.close();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestPositionIncrement.java Thu Nov  5 01:55:39 2009
@@ -63,6 +63,7 @@
 
   public void testSetPosition() throws Exception {
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new TokenStream() {
           private final String[] TOKENS = {"1", "2", "3", "4", "5"};
@@ -73,6 +74,7 @@
           TermAttribute termAtt = addAttribute(TermAttribute.class);
           OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
           
+          @Override
           public boolean incrementToken() {
             if (i == TOKENS.length)
               return false;
@@ -227,6 +229,7 @@
     public StopWhitespaceAnalyzer(boolean enablePositionIncrements) {
       this.enablePositionIncrements = enablePositionIncrements;
     }
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream ts = a.tokenStream(fieldName,reader);
       return new StopFilter(enablePositionIncrements, ts, new CharArraySet(Collections.singleton("stop"), true));
@@ -316,6 +319,7 @@
 
 class TestPayloadAnalyzer extends Analyzer {
 
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new LowerCaseTokenizer(reader);
     return new PayloadFilter(result, fieldName);
@@ -343,6 +347,7 @@
     termAttr = input.addAttribute(TermAttribute.class);
   }
 
+  @Override
   public boolean incrementToken() throws IOException {
     if (input.incrementToken()) {
       payloadAttr.setPayload(new Payload(("pos: " + pos).getBytes()));

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java Thu Nov  5 01:55:39 2009
@@ -41,6 +41,7 @@
   private static final String FIELD = "name";
   private RAMDirectory directory = new RAMDirectory();
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestScorerPerf.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestScorerPerf.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestScorerPerf.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestScorerPerf.java Thu Nov  5 01:55:39 2009
@@ -101,8 +101,10 @@
     int sum=0;
     protected int docBase = 0;
 
+    @Override
     public void setScorer(Scorer scorer) throws IOException {}
     
+    @Override
     public void collect(int doc) {
       count++;
       sum += docBase + doc;  // use it to avoid any possibility of being optimized away
@@ -111,9 +113,11 @@
     public int getCount() { return count; }
     public int getSum() { return sum; }
 
+    @Override
     public void setNextReader(IndexReader reader, int base) {
       docBase = base;
     }
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       return true;
     }
@@ -141,6 +145,7 @@
   BitSet addClause(BooleanQuery bq, BitSet result) {
     final BitSet rnd = sets[r.nextInt(sets.length)];
     Query q = new ConstantScoreQuery(new Filter() {
+      @Override
       public DocIdSet getDocIdSet(IndexReader reader) {
         return new DocIdBitSet(rnd);
       };

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSetNorm.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSetNorm.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSetNorm.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSetNorm.java Thu Nov  5 01:55:39 2009
@@ -67,15 +67,19 @@
        new Collector() {
          private int base = 0;
          private Scorer scorer;
+         @Override
          public void setScorer(Scorer scorer) throws IOException {
           this.scorer = scorer;
          }
+         @Override
          public final void collect(int doc) throws IOException {
            scores[doc + base] = scorer.score();
          }
+         @Override
          public void setNextReader(IndexReader reader, int docBase) {
            base = docBase;
          }
+         @Override
          public boolean acceptsDocsOutOfOrder() {
            return true;
          }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSimilarity.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSimilarity.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSimilarity.java Thu Nov  5 01:55:39 2009
@@ -88,14 +88,18 @@
 
     searcher.search(new TermQuery(b), new Collector() {
          private Scorer scorer;
-         public void setScorer(Scorer scorer) throws IOException {
+         @Override
+        public void setScorer(Scorer scorer) throws IOException {
            this.scorer = scorer; 
          }
-         public final void collect(int doc) throws IOException {
+         @Override
+        public final void collect(int doc) throws IOException {
            assertEquals(1.0f, scorer.score());
          }
-         public void setNextReader(IndexReader reader, int docBase) {}
-         public boolean acceptsDocsOutOfOrder() {
+         @Override
+        public void setNextReader(IndexReader reader, int docBase) {}
+         @Override
+        public boolean acceptsDocsOutOfOrder() {
            return true;
          }
        });
@@ -107,17 +111,21 @@
     searcher.search(bq, new Collector() {
          private int base = 0;
          private Scorer scorer;
-         public void setScorer(Scorer scorer) throws IOException {
+         @Override
+        public void setScorer(Scorer scorer) throws IOException {
            this.scorer = scorer; 
          }
-         public final void collect(int doc) throws IOException {
+         @Override
+        public final void collect(int doc) throws IOException {
            //System.out.println("Doc=" + doc + " score=" + score);
            assertEquals((float)doc+base+1, scorer.score());
          }
-         public void setNextReader(IndexReader reader, int docBase) {
+         @Override
+        public void setNextReader(IndexReader reader, int docBase) {
            base = docBase;
          }
-         public boolean acceptsDocsOutOfOrder() {
+         @Override
+        public boolean acceptsDocsOutOfOrder() {
            return true;
          }
        });
@@ -128,15 +136,19 @@
     //System.out.println(pq.toString("field"));
     searcher.search(pq,
        new Collector() {
-        private Scorer scorer;
-        public void setScorer(Scorer scorer) throws IOException {
+         private Scorer scorer;
+         @Override
+         public void setScorer(Scorer scorer) throws IOException {
           this.scorer = scorer; 
-        }
+         }
+         @Override
          public final void collect(int doc) throws IOException {
            //System.out.println("Doc=" + doc + " score=" + score);
            assertEquals(1.0f, scorer.score());
          }
+         @Override
          public void setNextReader(IndexReader reader, int docBase) {}
+         @Override
          public boolean acceptsDocsOutOfOrder() {
            return true;
          }
@@ -145,18 +157,22 @@
     pq.setSlop(2);
     //System.out.println(pq.toString("field"));
     searcher.search(pq, new Collector() {
-        private Scorer scorer;
-        public void setScorer(Scorer scorer) throws IOException {
-          this.scorer = scorer; 
-        }
-         public final void collect(int doc) throws IOException {
-           //System.out.println("Doc=" + doc + " score=" + score);
-           assertEquals(2.0f, scorer.score());
-         }
-         public void setNextReader(IndexReader reader, int docBase) {}
-         public boolean acceptsDocsOutOfOrder() {
-           return true;
-         }
-       });
+      private Scorer scorer;
+      @Override
+      public void setScorer(Scorer scorer) throws IOException {
+        this.scorer = scorer; 
+      }
+      @Override
+      public final void collect(int doc) throws IOException {
+        //System.out.println("Doc=" + doc + " score=" + score);
+        assertEquals(2.0f, scorer.score());
+      }
+      @Override
+      public void setNextReader(IndexReader reader, int docBase) {}
+      @Override
+      public boolean acceptsDocsOutOfOrder() {
+        return true;
+      }
+    });
   }
 }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSimpleExplanationsOfNonMatches.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSimpleExplanationsOfNonMatches.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSimpleExplanationsOfNonMatches.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSimpleExplanationsOfNonMatches.java Thu Nov  5 01:55:39 2009
@@ -48,6 +48,7 @@
    *
    * @see CheckHits#checkNoMatchExplanations
    */
+  @Override
   public void qtest(Query q, int[] expDocNrs) throws Exception {
     CheckHits.checkNoMatchExplanations(q, FIELD, searcher, expDocNrs);
   }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java Thu Nov  5 01:55:39 2009
@@ -206,6 +206,7 @@
     return getIndex (false, false);
   }
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     full = getFullIndex();
@@ -415,22 +416,27 @@
       slotValues = new int[numHits];
     }
 
+    @Override
     public void copy(int slot, int doc) {
       slotValues[slot] = docValues[doc];
     }
 
+    @Override
     public int compare(int slot1, int slot2) {
       return slotValues[slot1] - slotValues[slot2];
     }
 
+    @Override
     public int compareBottom(int doc) {
       return bottomValue - docValues[doc];
     }
 
+    @Override
     public void setBottom(int bottom) {
       bottomValue = slotValues[bottom];
     }
 
+    @Override
     public void setNextReader(IndexReader reader, int docBase) throws IOException {
       docValues = FieldCache.DEFAULT.getInts(reader, "parser", new FieldCache.IntParser() {
           public final int parseInt(final String val) {
@@ -439,12 +445,14 @@
         });
     }
 
+    @Override
     public Comparable value(int slot) {
       return Integer.valueOf(slotValues[slot]);
     }
   }
 
   static class MyFieldComparatorSource extends FieldComparatorSource {
+    @Override
     public FieldComparator newComparator(String fieldname, int numHits, int sortPos, boolean reversed) {
       return new MyFieldComparator(numHits);
     }
@@ -715,6 +723,7 @@
 
     // a filter that only allows through the first hit
     Filter filt = new Filter() {
+      @Override
       public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
         BitSet bs = new BitSet(reader.maxDoc());
         bs.set(0, reader.maxDoc());

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTermRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTermRangeQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTermRangeQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTermRangeQuery.java Thu Nov  5 01:55:39 2009
@@ -40,6 +40,7 @@
   private int docCount = 0;
   private RAMDirectory dir;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     dir = new RAMDirectory();
@@ -230,6 +231,7 @@
         termAtt = addAttribute(TermAttribute.class);
       }
 
+      @Override
       public boolean incrementToken() throws IOException {
         int count = input.read(buffer);
         if (done)
@@ -245,12 +247,14 @@
         }
       }
 
+      @Override
       public final void reset(Reader reader) throws IOException {
         super.reset(reader);
         done = false;
       }
     }
 
+    @Override
     public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException {
       Tokenizer tokenizer = (Tokenizer) getPreviousTokenStream();
       if (tokenizer == null) {
@@ -261,6 +265,7 @@
       return tokenizer;
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       return new SingleCharTokenizer(reader);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java Thu Nov  5 01:55:39 2009
@@ -45,6 +45,7 @@
         super(s);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         directory = new RAMDirectory();
@@ -82,10 +83,12 @@
         ts.score(new Collector() {
             private int base = 0;
             private Scorer scorer;
+            @Override
             public void setScorer(Scorer scorer) throws IOException {
               this.scorer = scorer; 
             }
 
+            @Override
             public void collect(int doc) throws IOException {
               float score = scorer.score();
               doc = doc + base;
@@ -94,9 +97,11 @@
               assertTrue("Doc: " + doc + " does not equal 0 or doc does not equal 5",
                             doc == 0 || doc == 5);
             }
+            @Override
             public void setNextReader(IndexReader reader, int docBase) {
               base = docBase;
             }
+            @Override
             public boolean acceptsDocsOutOfOrder() {
               return true;
             }
@@ -167,6 +172,7 @@
             this.score = score;
         }
 
+        @Override
         public String toString() {
             return "TestHit{" + "doc=" + doc + ", score=" + score + "}";
         }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTermVectors.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTermVectors.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTermVectors.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTermVectors.java Thu Nov  5 01:55:39 2009
@@ -39,6 +39,7 @@
     super(s);
   }
 
+  @Override
   public void setUp() throws Exception {                  
     super.setUp();
     IndexWriter writer = new IndexWriter(directory, new SimpleAnalyzer(), true,

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestThreadSafe.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestThreadSafe.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestThreadSafe.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestThreadSafe.java Thu Nov  5 01:55:39 2009
@@ -49,6 +49,7 @@
       this.rand = rand;
     }
 
+    @Override
     public void run() {
       try {
         for (int i=0; i<iter; i++) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java Thu Nov  5 01:55:39 2009
@@ -61,6 +61,7 @@
   /**
    * initializes searcher with a document set
    */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     final String docText[] = {
@@ -94,6 +95,7 @@
 
   }
 
+  @Override
   public void tearDown() throws Exception {
     searcher.close();
     super.tearDown();
@@ -269,6 +271,7 @@
     for( int i = 0; i < threadArray.length; ++i ) {
       final int num = i;
       threadArray[num] = new Thread() {
+          @Override
           public void run() {
             if (withTimeout) {
               doTestTimeout(true,true);
@@ -312,10 +315,12 @@
       return lastDocCollected;
     }
 
+    @Override
     public void setScorer(Scorer scorer) throws IOException {
       // scorer is not needed
     }
     
+    @Override
     public void collect(final int doc) throws IOException {
       int docId = doc + docBase;
       if( slowdown > 0 ) {
@@ -331,10 +336,12 @@
       lastDocCollected = docId;
     }
     
+    @Override
     public void setNextReader(IndexReader reader, int base) {
       docBase = base;
     }
     
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       return false;
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTopDocsCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTopDocsCollector.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTopDocsCollector.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTopDocsCollector.java Thu Nov  5 01:55:39 2009
@@ -39,6 +39,7 @@
       super(new HitQueue(size, false));
     }
     
+    @Override
     protected TopDocs newTopDocs(ScoreDoc[] results, int start) {
       if (results == null) {
         return EMPTY_TOPDOCS;
@@ -55,20 +56,24 @@
       return new TopDocs(totalHits, results, maxScore);
     }
     
+    @Override
     public void collect(int doc) throws IOException {
       ++totalHits;
       pq.insertWithOverflow(new ScoreDoc(doc + base, scores[idx++]));
     }
 
+    @Override
     public void setNextReader(IndexReader reader, int docBase)
         throws IOException {
       base = docBase;
     }
 
+    @Override
     public void setScorer(Scorer scorer) throws IOException {
       // Don't do anything. Assign scores in random
     }
     
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       return true;
     }
@@ -98,6 +103,7 @@
     return tdc;
   }
   
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     
@@ -110,6 +116,7 @@
     writer.close();
   }
   
+  @Override
   protected void tearDown() throws Exception {
     dir.close();
     dir = null;

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java Thu Nov  5 01:55:39 2009
@@ -74,6 +74,7 @@
   }
 
   /* @override */
+  @Override
   protected void tearDown() throws Exception {
     super.tearDown();
     dir = null;
@@ -81,6 +82,7 @@
   }
 
   /* @override */
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     // prepare a small index with just a few documents.  

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/JustCompileSearchSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/JustCompileSearchSpans.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/JustCompileSearchSpans.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/JustCompileSearchSpans.java Thu Nov  5 01:55:39 2009
@@ -35,10 +35,12 @@
 
   static final class JustCompileDocValues extends DocValues {
 
+    @Override
     public float floatVal(int doc) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public String toString(int doc) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -51,14 +53,17 @@
       super(field);
     }
 
+    @Override
     public boolean cachedFieldSourceEquals(FieldCacheSource other) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int cachedFieldSourceHashCode() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public DocValues getCachedFieldValues(FieldCache cache, String field,
         IndexReader reader) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
@@ -68,18 +73,22 @@
 
   static final class JustCompileValueSource extends ValueSource {
 
+    @Override
     public String description() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean equals(Object o) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public DocValues getValues(IndexReader reader) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int hashCode() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java Thu Nov  5 01:55:39 2009
@@ -77,14 +77,17 @@
       super(q,qValSrc);
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#name() */
+    @Override
     public String name() {
       return "customAdd";
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#customScore(int, float, float) */
+    @Override
     public float customScore(int doc, float subQueryScore, float valSrcScore) {
       return subQueryScore + valSrcScore;
     }
     /* (non-Javadoc)@see org.apache.lucene.search.function.CustomScoreQuery#customExplain(int, org.apache.lucene.search.Explanation, org.apache.lucene.search.Explanation)*/
+    @Override
     public Explanation customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl) {
       float valSrcScore = valSrcExpl==null ? 0 : valSrcExpl.getValue();
       Explanation exp = new Explanation( valSrcScore + subQueryExpl.getValue(), "custom score: sum of:");
@@ -103,10 +106,12 @@
       super(q,new ValueSourceQuery[]{qValSrc1,qValSrc2});
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#name() */
+    @Override
     public String name() {
       return "customMulAdd";
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#customScore(int, float, float) */
+    @Override
     public float customScore(int doc, float subQueryScore, float valSrcScores[]) {
       if (valSrcScores.length == 0) {
         return subQueryScore;
@@ -117,6 +122,7 @@
       return (subQueryScore + valSrcScores[0]) * valSrcScores[1]; // we know there are two
     } 
     /* (non-Javadoc)@see org.apache.lucene.search.function.CustomScoreQuery#customExplain(int, org.apache.lucene.search.Explanation, org.apache.lucene.search.Explanation)*/
+    @Override
     public Explanation customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpls[]) {
       if (valSrcExpls.length == 0) {
         return subQueryExpl;

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java Thu Nov  5 01:55:39 2009
@@ -99,6 +99,7 @@
      * @see org.apache.lucene.search.function.DocValues#floatVal(int)
      */
     /* @Override */
+    @Override
     public float floatVal(int doc) {
       return innerArray[doc];
     }
@@ -107,6 +108,7 @@
      * @see org.apache.lucene.search.function.DocValues#toString(int)
      */
     /* @Override */
+    @Override
     public String toString(int doc) {
       return Integer.toString(doc);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/payloads/PayloadHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/payloads/PayloadHelper.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/payloads/PayloadHelper.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/payloads/PayloadHelper.java Thu Nov  5 01:55:39 2009
@@ -48,6 +48,7 @@
 
 
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -66,6 +67,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       
       if (input.incrementToken()) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java Thu Nov  5 01:55:39 2009
@@ -55,6 +55,7 @@
   }
 
   private class PayloadAnalyzer extends Analyzer {
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -73,6 +74,7 @@
       payAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       boolean result = false;
       if (input.incrementToken() == true){
@@ -98,6 +100,7 @@
     return new PayloadNearQuery(clauses, 0, inOrder);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java Thu Nov  5 01:55:39 2009
@@ -64,6 +64,7 @@
   private class PayloadAnalyzer extends Analyzer {
 
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -83,6 +84,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
     
+    @Override
     public boolean incrementToken() throws IOException {
       boolean hasNext = input.incrementToken();
       if (hasNext) {
@@ -103,6 +105,7 @@
     }
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     directory = new RAMDirectory();
@@ -279,6 +282,7 @@
   static class BoostingSimilarity extends DefaultSimilarity {
 
     // TODO: Remove warning after API has been finalized
+    @Override
     public float scorePayload(int docId, String fieldName, int start, int end, byte[] payload, int offset, int length) {
       //we know it is size 4 here, so ignore the offset/length
       return payload[0];
@@ -287,26 +291,32 @@
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     //Make everything else 1 so we see the effect of the payload
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    @Override
     public float lengthNorm(String fieldName, int numTerms) {
       return 1;
     }
 
+    @Override
     public float queryNorm(float sumOfSquaredWeights) {
       return 1;
     }
 
+    @Override
     public float sloppyFreq(int distance) {
       return 1;
     }
 
+    @Override
     public float coord(int overlap, int maxOverlap) {
       return 1;
     }
 
+    @Override
     public float idf(int docFreq, int numDocs) {
       return 1;
     }
 
+    @Override
     public float tf(float freq) {
       return freq == 0 ? 0 : 1;
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java Thu Nov  5 01:55:39 2009
@@ -37,30 +37,37 @@
 
   static final class JustCompileSpans extends Spans {
 
+    @Override
     public int doc() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int end() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean next() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean skipTo(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int start() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Collection getPayload() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean isPayloadAvailable() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -69,14 +76,17 @@
 
   static final class JustCompileSpanQuery extends SpanQuery {
 
+    @Override
     public String getField() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Spans getSpans(IndexReader reader) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public String toString(String field) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -85,30 +95,37 @@
 
   static final class JustCompilePayloadSpans extends Spans {
 
+    @Override
     public Collection getPayload() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean isPayloadAvailable() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int doc() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int end() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean next() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean skipTo(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int start() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -122,6 +139,7 @@
       super(spans, weight, similarity, norms);
     }
 
+    @Override
     protected boolean setFreqCurrentDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestBasics.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestBasics.java?rev=832972&r1=832971&r2=832972&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestBasics.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestBasics.java Thu Nov  5 01:55:39 2009
@@ -51,6 +51,7 @@
 public class TestBasics extends LuceneTestCase {
   private IndexSearcher searcher;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();



Mime
View raw message