lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r833968 [4/10] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/ contrib/analyzers/common/src/java/org/apache/...
Date Mon, 09 Nov 2009 04:02:02 GMT
Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravRetVectorHighlightTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravRetVectorHighlightTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravRetVectorHighlightTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravRetVectorHighlightTask.java Mon Nov  9 04:01:50 2009
@@ -66,6 +66,7 @@
     super(runData);
   }
 
+  @Override
   public void setup() throws Exception {
     super.setup();
     //check to make sure either the doc is being stored
@@ -81,18 +82,22 @@
     }
   }
 
+  @Override
   public boolean withRetrieve() {
     return true;
   }
 
+  @Override
   public int numToHighlight() {
     return numToHighlight;
   }
   
+  @Override
   protected BenchmarkHighlighter getBenchmarkHighlighter(Query q){
     highlighter = new FastVectorHighlighter( false, false );
     final FieldQuery fq = highlighter.getFieldQuery( q );
     return new BenchmarkHighlighter(){
+      @Override
       public int doHighlight(IndexReader reader, int doc, String field,
           Document document, Analyzer analyzer, String text) throws Exception {
         String[] fragments = highlighter.getBestFragments(fq, reader, doc, field, fragSize, maxFrags);
@@ -101,6 +106,7 @@
     };
   }
 
+  @Override
   protected Collection<String> getFieldsToHighlight(Document document) {
     Collection<String> result = super.getFieldsToHighlight(document);
     //if stored is false, then result will be empty, in which case just get all the param fields
@@ -112,6 +118,7 @@
     return result;
   }
 
+  @Override
   public void setParams(String params) {
     String [] splits = params.split(",");
     for (int i = 0; i < splits.length; i++) {

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTravTask.java Mon Nov  9 04:01:50 2009
@@ -38,32 +38,39 @@
     super(runData);
   }
 
+  @Override
   public boolean withRetrieve() {
     return false;
   }
 
+  @Override
   public boolean withSearch() {
     return true;
   }
 
+  @Override
   public boolean withTraverse() {
     return true;
   }
 
+  @Override
   public boolean withWarm() {
     return false;
   }
 
   
 
+  @Override
   public QueryMaker getQueryMaker() {
     return getRunData().getQueryMaker(this);
   }
 
+  @Override
   public int traversalSize() {
     return traversalSize;
   }
 
+  @Override
   public void setParams(String params) {
     super.setParams(params);
     traversalSize = (int)Float.parseFloat(params);
@@ -72,6 +79,7 @@
   /* (non-Javadoc)
    * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#supportsParams()
    */
+  @Override
   public boolean supportsParams() {
     return true;
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithSortTask.java Mon Nov  9 04:01:50 2009
@@ -46,6 +46,7 @@
    * name:string,page:int,subject:string
    * 
    */
+  @Override
   public void setParams(String sortField) {
     super.setParams(sortField);
     String[] fields = sortField.split(",");
@@ -112,38 +113,47 @@
     return type;
   }
 
+  @Override
   public boolean supportsParams() {
     return true;
   }
 
+  @Override
   public QueryMaker getQueryMaker() {
     return getRunData().getQueryMaker(this);
   }
 
+  @Override
   public boolean withRetrieve() {
     return false;
   }
 
+  @Override
   public boolean withSearch() {
     return true;
   }
 
+  @Override
   public boolean withTraverse() {
     return false;
   }
 
+  @Override
   public boolean withWarm() {
     return false;
   }
 
+  @Override
   public boolean withScore() {
     return doScore;
   }
 
+  @Override
   public boolean withMaxScore() {
     return doMaxScore;
   }
   
+  @Override
   public Sort getSort() {
     if (sort == null) {
       throw new IllegalStateException("No sort field was set");

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SetPropTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SetPropTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SetPropTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SetPropTask.java Mon Nov  9 04:01:50 2009
@@ -37,6 +37,7 @@
   private String name;
   private String value;
   
+  @Override
   public int doLogic() throws Exception {
     if (name==null || value==null) {
       throw new Exception(getName()+" - undefined name or value: name="+name+" value="+value);
@@ -49,6 +50,7 @@
    * Set the params (property name and value).
    * @param params property name and value separated by ','.
    */
+  @Override
   public void setParams(String params) {
     super.setParams(params);
     int k = params.indexOf(",");
@@ -59,6 +61,7 @@
   /* (non-Javadoc)
    * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#supportsParams()
    */
+  @Override
   public boolean supportsParams() {
     return true;
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java Mon Nov  9 04:01:50 2009
@@ -56,6 +56,7 @@
     tasks = new ArrayList<PerfTask>();
   }
 
+  @Override
   public void close() throws Exception {
     initTasksArray();
     for(int i=0;i<tasksArray.length;i++) {
@@ -124,6 +125,7 @@
    * (non-Javadoc)
    * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#doLogic()
    */
+  @Override
   public int doLogic() throws Exception {
     exhausted = resetExhausted = false;
     return ( parallel ? doParallelTasks() : doSerialTasks());
@@ -212,6 +214,7 @@
       for (int i = 0; i < tasksArray.length; i++) {
         final PerfTask task = (PerfTask) tasksArray[i].clone();
         t[indx++] = new Thread() {
+          @Override
           public void run() {
             try {
               int n = task.runAndMaybeStats(letChildReport);
@@ -273,6 +276,7 @@
   /* (non-Javadoc)
    * @see java.lang.Object#toString()
    */
+  @Override
   public String toString() {
     String padd = getPadding();
     StringBuffer sb = new StringBuffer(super.toString());
@@ -342,6 +346,7 @@
     }
   }
 
+  @Override
   public String getName() {
     return seqName; // override to include more info 
   }
@@ -356,6 +361,7 @@
   /* (non-Javadoc)
    * @see java.lang.Object#clone()
    */
+  @Override
   protected Object clone() throws CloneNotSupportedException {
     TaskSequence res = (TaskSequence) super.clone();
     res.tasks = new ArrayList<PerfTask>();

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/UpdateDocTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/UpdateDocTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/UpdateDocTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/UpdateDocTask.java Mon Nov  9 04:01:50 2009
@@ -39,6 +39,7 @@
   // volatile data passed between setup(), doLogic(), tearDown().
   private Document doc = null;
   
+  @Override
   public void setup() throws Exception {
     super.setup();
     DocMaker docMaker = getRunData().getDocMaker();
@@ -49,11 +50,13 @@
     }
   }
 
+  @Override
   public void tearDown() throws Exception {
     doc = null;
     super.tearDown();
   }
 
+  @Override
   public int doLogic() throws Exception {
     final String docID = doc.get(DocMaker.ID_FIELD);
     if (docID == null) {
@@ -63,6 +66,7 @@
     return 1;
   }
 
+  @Override
   protected String getLogMessage(int recsCount) {
     return "updated " + recsCount + " docs";
   }
@@ -71,6 +75,7 @@
    * Set the params (docSize only)
    * @param params docSize, or 0 for no limit.
    */
+  @Override
   public void setParams(String params) {
     super.setParams(params);
     docSize = (int) Float.parseFloat(params); 
@@ -79,6 +84,7 @@
   /* (non-Javadoc)
    * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#supportsParams()
    */
+  @Override
   public boolean supportsParams() {
     return true;
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WarmTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WarmTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WarmTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WarmTask.java Mon Nov  9 04:01:50 2009
@@ -36,22 +36,27 @@
     super(runData);
   }
 
+  @Override
   public boolean withRetrieve() {
     return false;
   }
 
+  @Override
   public boolean withSearch() {
     return false;
   }
 
+  @Override
   public boolean withTraverse() {
     return false;
   }
 
+  @Override
   public boolean withWarm() {
     return true;
   }
 
+  @Override
   public QueryMaker getQueryMaker() {
     return null; // not required for this task.
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java Mon Nov  9 04:01:50 2009
@@ -89,10 +89,12 @@
     docMaker = runData.getDocMaker();
   }
 
+  @Override
   protected String getLogMessage(int recsCount) {
     return "Wrote " + recsCount + " line docs";
   }
   
+  @Override
   public int doLogic() throws Exception {
     Document doc = docSize > 0 ? docMaker.makeDocument(docSize) : docMaker.makeDocument();
 
@@ -117,6 +119,7 @@
     return 1;
   }
 
+  @Override
   public void close() throws Exception {
     lineFileOut.close();
     super.close();
@@ -126,6 +129,7 @@
    * Set the params (docSize only)
    * @param params docSize, or 0 for no limit.
    */
+  @Override
   public void setParams(String params) {
     if (super.supportsParams()) {
       super.setParams(params);
@@ -133,6 +137,7 @@
     docSize = (int) Float.parseFloat(params); 
   }
 
+  @Override
   public boolean supportsParams() {
     return true;
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Algorithm.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Algorithm.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Algorithm.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Algorithm.java Mon Nov  9 04:01:50 2009
@@ -228,6 +228,7 @@
   /* (non-Javadoc)
    * @see java.lang.Object#toString()
    */
+  @Override
   public String toString() {
     String newline = System.getProperty("line.separator");
     StringBuffer sb = new StringBuffer();

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StringBufferReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StringBufferReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StringBufferReader.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StringBufferReader.java Mon Nov  9 04:01:50 2009
@@ -72,6 +72,7 @@
     }
   }
 
+  @Override
   public void close() {
     synchronized (lock) {
       sb = null;
@@ -89,6 +90,7 @@
    * @exception IllegalArgumentException If readAheadLimit is < 0
    * @exception IOException If an I/O error occurs
    */
+  @Override
   public void mark(int readAheadLimit) throws IOException {
     if (readAheadLimit < 0){
       throw new IllegalArgumentException("Read-ahead limit cannpt be negative: " + readAheadLimit);
@@ -99,10 +101,12 @@
     }
   }
 
+  @Override
   public boolean markSupported() {
     return true;
   }
 
+  @Override
   public int read() throws IOException {
     synchronized (lock) {
       ensureOpen();
@@ -110,6 +114,7 @@
     }
   }
 
+  @Override
   public int read(char cbuf[], int off, int len) throws IOException {
     synchronized (lock) {
       ensureOpen();
@@ -134,6 +139,7 @@
     }
   }
 
+  @Override
   public boolean ready() throws IOException {
     synchronized (lock) {
       ensureOpen();
@@ -141,6 +147,7 @@
     }
   }
 
+  @Override
   public void reset() throws IOException {
     synchronized (lock) {
       ensureOpen();
@@ -155,6 +162,7 @@
       length = sb.length();
     }
   }
+  @Override
   public long skip(long ns) throws IOException {
     synchronized (lock) {
       ensureOpen();

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java Mon Nov  9 04:01:50 2009
@@ -131,6 +131,7 @@
     TermsDfQueue (int maxSize) {
       initialize(maxSize);
     }
+    @Override
     protected boolean lessThan(TermDf tf1, TermDf tf2) {
       return tf1.df < tf2.df;
     }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/MemUsage.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/MemUsage.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/MemUsage.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/MemUsage.java Mon Nov  9 04:01:50 2009
@@ -24,6 +24,7 @@
 
   public long maxTotal, minTotal, avgTotal;
 
+  @Override
   public String toString() {
     return toScaledString(1, "B");
   }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/QueryData.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/QueryData.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/QueryData.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/QueryData.java Mon Nov  9 04:01:50 2009
@@ -71,6 +71,7 @@
     return "# Query data: R-reopen, W-warmup, T-retrieve, N-no";
   }
 
+  @Override
   public String toString() {
     return id + " " + (reopen ? "R" : "NR") + " " + (warmup ? "W" : "NW") +
       " " + (retrieve ? "T" : "NT") + " [" + q.toString() + "]";

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestData.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestData.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestData.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestData.java Mon Nov  9 04:01:50 2009
@@ -426,6 +426,7 @@
         return res.toArray(new TestData[0]);
     }
 
+    @Override
     protected Object clone()
     {
         TestData cl = new TestData();
@@ -442,6 +443,7 @@
         return cl;
     }
 
+    @Override
     public String toString()
     {
         StringBuffer res = new StringBuffer();

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java Mon Nov  9 04:01:50 2009
@@ -160,6 +160,7 @@
   }
 
   /** Return a string representation. */
+  @Override
   public String toString() {
     StringBuffer sb = new StringBuffer();
     for (final String label : getLabels()) {

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TimeData.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TimeData.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TimeData.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TimeData.java Mon Nov  9 04:01:50 2009
@@ -64,6 +64,7 @@
     delta = elapsed;
   }
 
+  @Override
   protected Object clone() {
     TimeData td = new TimeData(name);
     td.name = name;
@@ -86,6 +87,7 @@
     return "# count\telapsed\trec/s\tfreeMem\ttotalMem";
   }
 
+  @Override
   public String toString() { return toString(true); }
   /**
    * Return a tab-separated string containing this data.

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java Mon Nov  9 04:01:50 2009
@@ -523,6 +523,7 @@
   public static class Reuters20ContentSource extends ReutersContentSource {
     private int nDocs = 0;
 
+    @Override
     public synchronized DocData getNextDocData(DocData docData)
         throws NoMoreDataException, IOException {
       if (nDocs >= 20 && !forever) {
@@ -532,6 +533,7 @@
       return super.getNextDocData(docData);
     }
 
+    @Override
     public synchronized void resetInputs() throws IOException {
       super.resetInputs();
       nDocs = 0;

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java Mon Nov  9 04:01:50 2009
@@ -41,9 +41,11 @@
 
     private boolean finish = false;
     
+    @Override
     public void close() throws IOException {
     }
 
+    @Override
     public DocData getNextDocData(DocData docData) throws NoMoreDataException,
         IOException {
       if (finish) {

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/TrecContentSourceTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/TrecContentSourceTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/TrecContentSourceTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/TrecContentSourceTest.java Mon Nov  9 04:01:50 2009
@@ -40,6 +40,7 @@
       this.forever = forever;
     }
     
+    @Override
     void openNextFile() throws NoMoreDataException, IOException {
       if (reader != null) {
         if (!forever) {
@@ -51,6 +52,7 @@
       reader = new BufferedReader(new StringReader(docs));
     }
     
+    @Override
     public void setConfig(Config config) {
       htmlParser = new DemoHTMLParser();
     }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingHighlighterTestTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingHighlighterTestTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingHighlighterTestTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingHighlighterTestTask.java Mon Nov  9 04:01:50 2009
@@ -43,6 +43,7 @@
     super(runData);
   }
 
+  @Override
   protected Document retrieveDoc(IndexReader ir, int id) throws IOException {
     Document document = ir.document(id);
     if (document != null) {
@@ -51,9 +52,11 @@
     return document;
   }
 
+  @Override
   public BenchmarkHighlighter getBenchmarkHighlighter(Query q) {
     highlighter = new Highlighter(new SimpleHTMLFormatter(), new QueryScorer(q));
     return new BenchmarkHighlighter() {
+      @Override
       public int doHighlight(IndexReader reader, int doc, String field, Document document, Analyzer analyzer, String text) throws Exception {
         TokenStream ts = TokenSources.getAnyTokenStream(reader, doc, field, document, analyzer);
         TextFragment[] frag = highlighter.getBestTextFragments(ts, text, mergeContiguous, maxFrags);

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingSearchTestTask.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingSearchTestTask.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingSearchTestTask.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CountingSearchTestTask.java Mon Nov  9 04:01:50 2009
@@ -33,6 +33,7 @@
     super(runData);
   }
 
+  @Override
   public int doLogic() throws Exception {
     int res = super.doLogic();
     incrNumSearches();

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/PerfTaskTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/PerfTaskTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/PerfTaskTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/PerfTaskTest.java Mon Nov  9 04:01:50 2009
@@ -32,6 +32,7 @@
       super(runData);
     }
 
+    @Override
     public int doLogic() throws Exception {
       return 0;
     }

Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTaskTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTaskTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTaskTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTaskTest.java Mon Nov  9 04:01:50 2009
@@ -40,6 +40,7 @@
   // class has to be public so that Class.forName.newInstance() will work
   public static final class WriteLineDocMaker extends DocMaker {
   
+    @Override
     public Document makeDocument() throws Exception {
       Document doc = new Document();
       doc.add(new Field(BODY_FIELD, "body", Store.NO, Index.NOT_ANALYZED_NO_NORMS));
@@ -53,6 +54,7 @@
   // class has to be public so that Class.forName.newInstance() will work
   public static final class NewLinesDocMaker extends DocMaker {
   
+    @Override
     public Document makeDocument() throws Exception {
       Document doc = new Document();
       doc.add(new Field(BODY_FIELD, "body\r\ntext\ttwo", Store.NO, Index.NOT_ANALYZED_NO_NORMS));
@@ -65,6 +67,7 @@
   
   // class has to be public so that Class.forName.newInstance() will work
   public static final class NoBodyDocMaker extends DocMaker {
+    @Override
     public Document makeDocument() throws Exception {
       Document doc = new Document();
       doc.add(new Field(TITLE_FIELD, "title", Store.NO, Index.NOT_ANALYZED_NO_NORMS));
@@ -75,6 +78,7 @@
   
   // class has to be public so that Class.forName.newInstance() will work
   public static final class NoTitleDocMaker extends DocMaker {
+    @Override
     public Document makeDocument() throws Exception {
       Document doc = new Document();
       doc.add(new Field(BODY_FIELD, "body", Store.NO, Index.NOT_ANALYZED_NO_NORMS));
@@ -85,6 +89,7 @@
   
   // class has to be public so that Class.forName.newInstance() will work
   public static final class JustDateDocMaker extends DocMaker {
+    @Override
     public Document makeDocument() throws Exception {
       Document doc = new Document();
       doc.add(new Field(DATE_FIELD, "date", Store.NO, Index.NOT_ANALYZED_NO_NORMS));

Modified: lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyAnalyzer.java Mon Nov  9 04:01:50 2009
@@ -82,6 +82,7 @@
     this.collator = collator;
   }
 
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new KeywordTokenizer(reader);
     result = new CollationKeyFilter(result, collator);
@@ -93,6 +94,7 @@
     TokenStream result;
   }
   
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) 
     throws IOException {
     

Modified: lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/CollationKeyFilter.java Mon Nov  9 04:01:50 2009
@@ -88,6 +88,7 @@
     termAtt = addAttribute(TermAttribute.class);
   }
 
+  @Override
   public boolean incrementToken() throws IOException {
     if (input.incrementToken()) {
       char[] termBuffer = termAtt.termBuffer();

Modified: lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyAnalyzer.java Mon Nov  9 04:01:50 2009
@@ -76,6 +76,7 @@
     this.collator = collator;
   }
 
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new KeywordTokenizer(reader);
     result = new ICUCollationKeyFilter(result, collator);
@@ -87,6 +88,7 @@
     TokenStream result;
   }
   
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) 
     throws IOException {
     

Modified: lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/java/org/apache/lucene/collation/ICUCollationKeyFilter.java Mon Nov  9 04:01:50 2009
@@ -86,6 +86,7 @@
     termAtt = addAttribute(TermAttribute.class);
   }
 
+  @Override
   public boolean incrementToken() throws IOException {
     if (input.incrementToken()) {
       char[] termBuffer = termAtt.termBuffer();

Modified: lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestCollationKeyFilter.java Mon Nov  9 04:01:50 2009
@@ -52,6 +52,7 @@
       this.collator = collator;
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new KeywordTokenizer(reader);
       result = new CollationKeyFilter(result, collator);

Modified: lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/collation/src/test/org/apache/lucene/collation/TestICUCollationKeyFilter.java Mon Nov  9 04:01:50 2009
@@ -49,6 +49,7 @@
       this.collator = collator;
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new KeywordTokenizer(reader);
       result = new ICUCollationKeyFilter(result, collator);

Modified: lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEDirectory.java Mon Nov  9 04:01:50 2009
@@ -89,6 +89,7 @@
         this(txn, files, blocks, 0);
     }
 
+    @Override
     public void close() throws IOException {
         flush();
     }
@@ -110,18 +111,22 @@
         }
     }
 
+    @Override
     public IndexOutput createOutput(String name) throws IOException {
         return new JEIndexOutput(this, name, true);
     }
 
+    @Override
     public void deleteFile(String name) throws IOException {
         new File(name).delete(this);
     }
 
+    @Override
     public boolean fileExists(String name) throws IOException {
         return new File(name).exists(this);
     }
 
+    @Override
     public long fileLength(String name) throws IOException {
         File file = new File(name);
 
@@ -131,6 +136,7 @@
         throw new IOException("File does not exist: " + name);
     }
 
+    @Override
     public long fileModified(String name) throws IOException {
         File file = new File(name);
 
@@ -140,6 +146,7 @@
         throw new IOException("File does not exist: " + name);
     }
 
+    @Override
     public String[] listAll() throws IOException {
         Cursor cursor = null;
         List list = new ArrayList();
@@ -182,14 +189,17 @@
         return (String[]) list.toArray(new String[list.size()]);
     }
 
+    @Override
     public IndexInput openInput(String name) throws IOException {
         return new JEIndexInput(this, name);
     }
 
+    @Override
     public Lock makeLock(String name) {
         return new JELock();
     }
 
+    @Override
     public void touchFile(String name) throws IOException {
         File file = new File(name);
         long length = 0L;

Modified: lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexInput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexInput.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexInput.java Mon Nov  9 04:01:50 2009
@@ -51,6 +51,7 @@
         block.get(directory);
     }
 
+    @Override
     public Object clone() {
         try {
             JEIndexInput clone = (JEIndexInput) super.clone();
@@ -65,13 +66,16 @@
         }
     }
 
+    @Override
     public void close() throws IOException {
     }
 
+    @Override
     public long length() {
         return length;
     }
 
+    @Override
     public byte readByte() throws IOException {
         if (position + 1 > length)
             throw new IOException(file.getName() + ": Reading past end of file");
@@ -87,6 +91,7 @@
         return b;
     }
 
+    @Override
     public void readBytes(byte[] b, int offset, int len) throws IOException {
         if (position + len > length)
             throw new IOException("Reading past end of file");
@@ -116,6 +121,7 @@
         }
     }
 
+    @Override
     public void seek(long pos) throws IOException {
         if (pos > length)
             throw new IOException("seeking past end of file");
@@ -128,6 +134,7 @@
         position = pos;
     }
 
+    @Override
     public long getFilePointer() {
         return position;
     }

Modified: lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JEIndexOutput.java Mon Nov  9 04:01:50 2009
@@ -62,6 +62,7 @@
         directory.openFiles.add(this);
     }
 
+    @Override
     public void close() throws IOException {
         flush();
         file.modify(directory, length, System.currentTimeMillis());
@@ -69,11 +70,13 @@
         directory.openFiles.remove(this);
     }
 
+    @Override
     public void flush() throws IOException {
         if (length > 0)
             block.put(directory);
     }
 
+    @Override
     public void writeByte(byte b) throws IOException {
         int blockPos = (int) (position++ & BLOCK_MASK);
 
@@ -89,6 +92,7 @@
             length = position;
     }
 
+    @Override
     public void writeBytes(byte[] b, int offset, int len) throws IOException {
         int blockPos = (int) (position & BLOCK_MASK);
 
@@ -116,10 +120,12 @@
             length = position;
     }
 
+    @Override
     public long length() throws IOException {
         return length;
     }
 
+    @Override
     public void seek(long pos) throws IOException {
         if (pos > length)
             throw new IOException("seeking past end of file");
@@ -134,6 +140,7 @@
         }
     }
 
+    @Override
     public long getFilePointer() {
         return position;
     }

Modified: lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JELock.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JELock.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JELock.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb-je/src/java/org/apache/lucene/store/je/JELock.java Mon Nov  9 04:01:50 2009
@@ -32,16 +32,19 @@
     {
     }
 
+    @Override
     public boolean obtain()
     {
         return (isLocked = true);
     }
 
+    @Override
     public void release()
     {
         isLocked = false;
     }
 
+    @Override
     public boolean isLocked()
     {
         return isLocked;

Modified: lucene/java/branches/flex_1458/contrib/db/bdb-je/src/test/org/apache/lucene/store/je/JEStoreTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb-je/src/test/org/apache/lucene/store/je/JEStoreTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb-je/src/test/org/apache/lucene/store/je/JEStoreTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb-je/src/test/org/apache/lucene/store/je/JEStoreTest.java Mon Nov  9 04:01:50 2009
@@ -52,6 +52,7 @@
 
     protected Database index, blocks;
 
+    @Override
     public void setUp() throws Exception {
 
         if (!dbHome.exists())
@@ -97,6 +98,7 @@
         }
     }
 
+    @Override
     public void tearDown() throws Exception {
 
         if (index != null)

Modified: lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbDirectory.java Mon Nov  9 04:01:50 2009
@@ -97,6 +97,7 @@
         this(txn, files, blocks, 0);
     }
 
+    @Override
     public void close()
         throws IOException
     {
@@ -118,24 +119,28 @@
             ((IndexOutput) iterator.next()).flush();
     }
 
+    @Override
     public IndexOutput createOutput(String name)
         throws IOException
     {
         return new DbIndexOutput(this, name, true);
     }
 
+    @Override
     public void deleteFile(String name)
         throws IOException
     {
         new File(name).delete(this);
     }
 
+    @Override
     public boolean fileExists(String name)
         throws IOException
     {
         return new File(name).exists(this);
     }
 
+    @Override
     public long fileLength(String name)
         throws IOException
     {
@@ -147,6 +152,7 @@
         throw new IOException("File does not exist: " + name);
     }
     
+    @Override
     public long fileModified(String name)
         throws IOException
     {
@@ -158,6 +164,7 @@
         throw new IOException("File does not exist: " + name);
     }
 
+    @Override
     public String[] listAll()
         throws IOException
     {
@@ -205,17 +212,20 @@
         return (String[]) list.toArray(new String[list.size()]);
     }
 
+    @Override
     public IndexInput openInput(String name)
         throws IOException
     {
         return new DbIndexInput(this, name);
     }
 
+    @Override
     public Lock makeLock(String name)
     {
         return new DbLock();
     }
 
+    @Override
     public void touchFile(String name)
         throws IOException
     {

Modified: lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexInput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexInput.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexInput.java Mon Nov  9 04:01:50 2009
@@ -47,6 +47,7 @@
         block.get(directory);
     }
 
+    @Override
     public Object clone()
     {
         try {
@@ -62,16 +63,19 @@
         }
     }
 
+    @Override
     public void close()
         throws IOException
     {
     }
 
+    @Override
     public long length()
     {
         return length;
     }
 
+    @Override
     public byte readByte()
         throws IOException
     {
@@ -90,6 +94,7 @@
         return b;
     }
 
+    @Override
     public void readBytes(byte[] b, int offset, int len)
         throws IOException
     {
@@ -122,6 +127,7 @@
         }
     }
 
+    @Override
     public void seek(long pos)
         throws IOException
     {
@@ -138,6 +144,7 @@
         position = pos;
     }
 
+    @Override
     public long getFilePointer()
     {
         return position;

Modified: lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbIndexOutput.java Mon Nov  9 04:01:50 2009
@@ -55,6 +55,7 @@
         directory.openFiles.add(this);
     }
 
+    @Override
     public void close()
         throws IOException
     {
@@ -64,6 +65,7 @@
         directory.openFiles.remove(this);
     }
 
+    @Override
     public void flush()
         throws IOException
     {
@@ -71,6 +73,7 @@
             block.put(directory);
     }
 
+    @Override
     public void writeByte(byte b)
         throws IOException
     {
@@ -89,6 +92,7 @@
             length = position;
     }
 
+    @Override
     public void writeBytes(byte[] b, int offset, int len)
         throws IOException
     {
@@ -119,12 +123,14 @@
             length = position;
     }
 
+    @Override
     public long length()
         throws IOException
     {
         return length;
     }
 
+    @Override
     public void seek(long pos)
         throws IOException
     {
@@ -142,6 +148,7 @@
         }
     }
 
+    @Override
     public long getFilePointer()
     {
         return position;

Modified: lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbLock.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbLock.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbLock.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb/src/java/org/apache/lucene/store/db/DbLock.java Mon Nov  9 04:01:50 2009
@@ -34,16 +34,19 @@
     {
     }
 
+    @Override
     public boolean obtain()
     {
         return (isLocked = true);
     }
 
+    @Override
     public void release()
     {
         isLocked = false;
     }
 
+    @Override
     public boolean isLocked()
     {
         return isLocked;

Modified: lucene/java/branches/flex_1458/contrib/db/bdb/src/test/org/apache/lucene/store/db/DbStoreTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/db/bdb/src/test/org/apache/lucene/store/db/DbStoreTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/db/bdb/src/test/org/apache/lucene/store/db/DbStoreTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/db/bdb/src/test/org/apache/lucene/store/db/DbStoreTest.java Mon Nov  9 04:01:50 2009
@@ -47,6 +47,7 @@
     protected Environment env;
     protected Database index, blocks;
     
+    @Override
     public void setUp()
         throws Exception
     {
@@ -99,6 +100,7 @@
         }
     }
 
+    @Override
     public void tearDown()
         throws Exception
     {

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldFragList.java Mon Nov  9 04:01:50 2009
@@ -70,6 +70,7 @@
       }
     }
     
+    @Override
     public String toString(){
       StringBuilder sb = new StringBuilder();
       sb.append( "subInfos=(" );
@@ -90,6 +91,7 @@
         this.seqnum = seqnum;
       }
       
+      @Override
       public String toString(){
         StringBuilder sb = new StringBuilder();
         sb.append( text ).append( '(' );

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldPhraseList.java Mon Nov  9 04:01:50 2009
@@ -153,6 +153,7 @@
       return false;
     }
     
+    @Override
     public String toString(){
       StringBuilder sb = new StringBuilder();
       sb.append( text ).append( '(' ).append( boost ).append( ")(" );
@@ -173,6 +174,7 @@
       void setEndOffset( int endOffset ){
         this.endOffset = endOffset;
       }
+      @Override
       public String toString(){
         StringBuilder sb = new StringBuilder();
         sb.append( '(' ).append( startOffset ).append( ',' ).append( endOffset ).append( ')' );

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/FieldTermStack.java Mon Nov  9 04:01:50 2009
@@ -159,6 +159,7 @@
     public int getEndOffset(){ return endOffset; }
     public int getPosition(){ return position; }
     
+    @Override
     public String toString(){
       StringBuilder sb = new StringBuilder();
       sb.append( text ).append( '(' ).append(startOffset).append( ',' ).append( endOffset ).append( ',' ).append( position ).append( ')' );

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/ScoreOrderFragmentsBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/ScoreOrderFragmentsBuilder.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/ScoreOrderFragmentsBuilder.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/ScoreOrderFragmentsBuilder.java Mon Nov  9 04:01:50 2009
@@ -48,6 +48,7 @@
   /**
    * Sort by score the list of WeightedFragInfo
    */
+  @Override
   public List<WeightedFragInfo> getWeightedFragInfoList( List<WeightedFragInfo> src ) {
     Collections.sort( src, new ScoreComparator() );
     return src;

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilder.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilder.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/java/org/apache/lucene/search/vectorhighlight/SimpleFragmentsBuilder.java Mon Nov  9 04:01:50 2009
@@ -47,6 +47,7 @@
   /**
    * do nothing. return the source list.
    */
+  @Override
   public List<WeightedFragInfo> getWeightedFragInfoList( List<WeightedFragInfo> src ) {
     return src;
   }

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java Mon Nov  9 04:01:50 2009
@@ -76,6 +76,7 @@
     "\nWhen you talk about processing speed, the"
   };
 
+  @Override
   protected void setUp() throws Exception {
     analyzerW = new WhitespaceAnalyzer();
     analyzerB = new BigramAnalyzer();
@@ -84,6 +85,7 @@
     dir = new RAMDirectory();
   }
   
+  @Override
   protected void tearDown() throws Exception {
     if( reader != null ){
       reader.close();
@@ -147,6 +149,7 @@
   }
 
   static class BigramAnalyzer extends Analyzer {
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       return new BasicNGramTokenizer( reader );
     }
@@ -198,6 +201,7 @@
 
     TermAttribute termAtt = addAttribute(TermAttribute.class);
     OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
+    @Override
     public boolean incrementToken() throws IOException {
       if( !getNextPartialSnippet() )
         return false;
@@ -211,6 +215,7 @@
       return nextStartOffset;
     }
     
+    @Override
     public final void end(){
       offsetAtt.setOffset(getFinalOffset(),getFinalOffset());
     }

Modified: lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/fast-vector-highlighter/src/test/org/apache/lucene/search/vectorhighlight/IndexTimeSynonymTest.java Mon Nov  9 04:01:50 2009
@@ -298,11 +298,13 @@
       this.tokens = tokens;
     }
     
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {      
       TokenStream ts = new TokenStream(Token.TOKEN_ATTRIBUTE_FACTORY) {
         final AttributeImpl reusableToken = (AttributeImpl) addAttribute(TermAttribute.class);
         int p = 0;
         
+        @Override
         public boolean incrementToken() throws IOException {
           if( p >= tokens.length ) return false;
           clearAttributes();

Modified: lucene/java/branches/flex_1458/contrib/highlighter/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/build.xml?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/build.xml (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/build.xml Mon Nov  9 04:01:50 2009
@@ -27,18 +27,26 @@
 
   <property name="memory.jar" location="${common.dir}/build/contrib/memory/lucene-memory-${version}.jar"/>
   <available property="memory.jar.present" type="file" file="${memory.jar}"/>
+  
+  <property name="regex.jar" location="${common.dir}/build/contrib/regex/lucene-regex-${version}.jar"/>
+  <available property="regex.jar.present" type="file" file="${regex.jar}"/>
 
   <path id="classpath">
     <pathelement path="${lucene.jar}"/>
     <pathelement path="${memory.jar}"/>
+    <pathelement path="${regex.jar}"/>
     <pathelement path="${project.classpath}"/>
   </path>
 
-  <target name="compile-core" depends="build-memory, common.compile-core" />
+  <target name="compile-core" depends="build-memory, build-regex, common.compile-core" />
 
   <target name="build-memory" unless="memory.jar.present">
     <echo>Highlighter building dependency ${memory.jar}</echo>
     <ant antfile="../memory/build.xml" target="default" inheritall="false" dir="../memory" />
   </target>
-
+  
+  <target name="build-regex" unless="regex.jar.present">
+    <echo>Highlighter building dependency ${regex.jar}</echo>
+    <ant antfile="../regex/build.xml" target="default" inheritall="false" dir="../regex" />
+  </target>
 </project>

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/Highlighter.java Mon Nov  9 04:01:50 2009
@@ -574,6 +574,7 @@
 		initialize(size);
 	}
 
+	@Override
 	public final boolean lessThan(TextFragment fragA, TextFragment fragB)
 	{
 		if (fragA.getScore() == fragB.getScore())

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/SpanGradientFormatter.java Mon Nov  9 04:01:50 2009
@@ -39,6 +39,7 @@
 	
 
 	
+	@Override
 	public String highlightTerm(String originalText, TokenGroup tokenGroup)
     {
         if (tokenGroup.getTotalScore() == 0)

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java Mon Nov  9 04:01:50 2009
@@ -79,6 +79,7 @@
 
 	/* Returns the marked-up text for this text fragment 
 	 */
+	@Override
 	public String toString() {
 		return markedUpText.subSequence(textStartPos, textEndPos).toString();
 	}

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TokenSources.java Mon Nov  9 04:01:50 2009
@@ -151,6 +151,7 @@
             offsetAtt = addAttribute(OffsetAttribute.class);
           }
     
+          @Override
           public boolean incrementToken() throws IOException {
             if (currentToken >= tokens.length) {
               return false;

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java Mon Nov  9 04:01:50 2009
@@ -32,7 +32,10 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.memory.MemoryIndex;
 import org.apache.lucene.search.*;
+import org.apache.lucene.search.spans.FieldMaskingSpanQuery;
+import org.apache.lucene.search.spans.SpanFirstQuery;
 import org.apache.lucene.search.spans.SpanNearQuery;
+import org.apache.lucene.search.spans.SpanNotQuery;
 import org.apache.lucene.search.spans.SpanOrQuery;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
@@ -220,16 +223,11 @@
    * @throws IOException
    */
   private void extractWeightedSpanTerms(Map<String,WeightedSpanTerm> terms, SpanQuery spanQuery) throws IOException {
-    Set<Term> nonWeightedTerms = new HashSet<Term>();
-    spanQuery.extractTerms(nonWeightedTerms);
-
     Set<String> fieldNames;
 
     if (fieldName == null) {
       fieldNames = new HashSet<String>();
-      for (final Term queryTerm : nonWeightedTerms) {
-        fieldNames.add(queryTerm.field());
-      }
+      collectSpanQueryFields(spanQuery, fieldNames);
     } else {
       fieldNames = new HashSet<String>(1);
       fieldNames.add(fieldName);
@@ -238,13 +236,33 @@
     if (defaultField != null) {
       fieldNames.add(defaultField);
     }
+    
+    Map<String, SpanQuery> queries = new HashMap<String, SpanQuery>();
+ 
+    Set<Term> nonWeightedTerms = new HashSet<Term>();
+    final boolean mustRewriteQuery = mustRewriteQuery(spanQuery);
+    if (mustRewriteQuery) {
+      for (final String field : fieldNames) {
+        final SpanQuery rewrittenQuery = (SpanQuery) spanQuery.rewrite(getReaderForField(field));
+        queries.put(field, rewrittenQuery);
+        rewrittenQuery.extractTerms(nonWeightedTerms);
+      }
+    } else {
+      spanQuery.extractTerms(nonWeightedTerms);
+    }
 
     List<PositionSpan> spanPositions = new ArrayList<PositionSpan>();
 
     for (final String field : fieldNames) {
 
       IndexReader reader = getReaderForField(field);
-      Spans spans = spanQuery.getSpans(reader);
+      final Spans spans;
+      if (mustRewriteQuery) {
+        spans = queries.get(field).getSpans(reader);
+      } else {
+        spans = spanQuery.getSpans(reader);
+      }
+
 
       // collect span positions
       while (spans.next()) {
@@ -429,12 +447,64 @@
     return terms;
   }
   
+  private void collectSpanQueryFields(SpanQuery spanQuery, Set<String> fieldNames) {
+    if (spanQuery instanceof FieldMaskingSpanQuery) {
+      collectSpanQueryFields(((FieldMaskingSpanQuery)spanQuery).getMaskedQuery(), fieldNames);
+    } else if (spanQuery instanceof SpanFirstQuery) {
+      collectSpanQueryFields(((SpanFirstQuery)spanQuery).getMatch(), fieldNames);
+    } else if (spanQuery instanceof SpanNearQuery) {
+      for (final SpanQuery clause : ((SpanNearQuery)spanQuery).getClauses()) {
+        collectSpanQueryFields(clause, fieldNames);
+      }
+    } else if (spanQuery instanceof SpanNotQuery) {
+      collectSpanQueryFields(((SpanNotQuery)spanQuery).getInclude(), fieldNames);
+    } else if (spanQuery instanceof SpanOrQuery) {
+      for (final SpanQuery clause : ((SpanOrQuery)spanQuery).getClauses()) {
+        collectSpanQueryFields(clause, fieldNames);
+      }
+    } else {
+      fieldNames.add(spanQuery.getField());
+    }
+  }
+  
+  private boolean mustRewriteQuery(SpanQuery spanQuery) {
+    if (!expandMultiTermQuery) {
+      return false; // Will throw UnsupportedOperationException in case of a SpanRegexQuery.
+    } else if (spanQuery instanceof FieldMaskingSpanQuery) {
+      return mustRewriteQuery(((FieldMaskingSpanQuery)spanQuery).getMaskedQuery());
+    } else if (spanQuery instanceof SpanFirstQuery) {
+      return mustRewriteQuery(((SpanFirstQuery)spanQuery).getMatch());
+    } else if (spanQuery instanceof SpanNearQuery) {
+      for (final SpanQuery clause : ((SpanNearQuery)spanQuery).getClauses()) {
+        if (mustRewriteQuery(clause)) {
+          return true;
+        }
+      }
+      return false; 
+    } else if (spanQuery instanceof SpanNotQuery) {
+      SpanNotQuery spanNotQuery = (SpanNotQuery)spanQuery;
+      return mustRewriteQuery(spanNotQuery.getInclude()) || mustRewriteQuery(spanNotQuery.getExclude());
+    } else if (spanQuery instanceof SpanOrQuery) {
+      for (final SpanQuery clause : ((SpanOrQuery)spanQuery).getClauses()) {
+        if (mustRewriteQuery(clause)) {
+          return true;
+        }
+      }
+      return false; 
+    } else if (spanQuery instanceof SpanTermQuery) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+  
   /**
    * This class makes sure that if both position sensitive and insensitive
    * versions of the same term are added, the position insensitive one wins.
    */
   static private class PositionCheckingMap<K> extends HashMap<K,WeightedSpanTerm> {
 
+    @Override
     public void putAll(Map m) {
       Iterator<Map.Entry<K, WeightedSpanTerm>> it = m.entrySet().iterator();
       while (it.hasNext()) {
@@ -443,6 +513,7 @@
       }
     }
 
+    @Override
     public WeightedSpanTerm put(K key, WeightedSpanTerm value) {
       WeightedSpanTerm prev = super.put(key, value);
       if (prev == null) return prev;

Propchange: lucene/java/branches/flex_1458/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  9 04:01:50 2009
@@ -1,4 +1,4 @@
 /lucene/java/branches/lucene_2_4/contrib/highlighter/src/test:748824
-/lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881
+/lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter/src/test:818601-821336
-/lucene/java/trunk/contrib/highlighter/src/test:829439-830804
+/lucene/java/trunk/contrib/highlighter/src/test:829439-833960

Modified: lucene/java/branches/flex_1458/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java Mon Nov  9 04:01:50 2009
@@ -70,8 +70,10 @@
 import org.apache.lucene.search.WildcardQuery;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.highlight.SynonymTokenizer.TestHighlightRunner;
+import org.apache.lucene.search.regex.SpanRegexQuery;
 import org.apache.lucene.search.spans.SpanNearQuery;
 import org.apache.lucene.search.spans.SpanNotQuery;
+import org.apache.lucene.search.spans.SpanOrQuery;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
 import org.apache.lucene.store.Directory;
@@ -306,6 +308,31 @@
     
   }
   
+  public void testSpanRegexQuery() throws Exception {
+    query = new SpanOrQuery(new SpanQuery [] {
+        new SpanRegexQuery(new Term(FIELD_NAME, "ken.*")) });
+    searcher = new IndexSearcher(ramDir, true);
+    hits = searcher.search(query, 100);
+    int maxNumFragmentsRequired = 2;
+
+    QueryScorer scorer = new QueryScorer(query, FIELD_NAME);
+    Highlighter highlighter = new Highlighter(this, scorer);
+    
+    for (int i = 0; i < hits.totalHits; i++) {
+      String text = searcher.doc(hits.scoreDocs[i].doc).get(FIELD_NAME);
+      TokenStream tokenStream = analyzer.tokenStream(FIELD_NAME, new StringReader(text));
+
+      highlighter.setTextFragmenter(new SimpleFragmenter(40));
+
+      String result = highlighter.getBestFragments(tokenStream, text, maxNumFragmentsRequired,
+          "...");
+      System.out.println("\t" + result);
+    }
+    
+    assertTrue("Failed to find correct number of highlights " + numHighlights + " found",
+        numHighlights == 5);
+  }
+  
   public void testNumericRangeQuery() throws Exception {
     // doesn't currently highlight, but make sure it doesn't cause exception either
     query = NumericRangeQuery.newIntRange(NUMERIC_FIELD_NAME, 2, 6, true, true);
@@ -476,6 +503,7 @@
 
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         mode = QUERY;
         doStandardHighlights(analyzer, searcher, hits, query, HighlighterTest.this);
@@ -518,6 +546,7 @@
     doSearching(bquery);
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         mode = QUERY;
         doStandardHighlights(analyzer, searcher, hits, query, HighlighterTest.this);
@@ -536,6 +565,7 @@
         new Term(FIELD_NAME, "john"))));
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         mode = QUERY;
         doStandardHighlights(analyzer, searcher, hits, query, HighlighterTest.this);
@@ -550,6 +580,7 @@
   public void testGetBestFragmentsSimpleQuery() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("Kennedy");
@@ -565,6 +596,7 @@
   public void testGetFuzzyFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("Kinnedy~");
@@ -580,6 +612,7 @@
   public void testGetWildCardFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("K?nnedy");
@@ -595,6 +628,7 @@
   public void testGetMidWildCardFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("K*dy");
@@ -610,6 +644,7 @@
   public void testGetRangeFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         String queryString = FIELD_NAME + ":[kannedy TO kznnedy]";
@@ -726,6 +761,7 @@
   public void testGetBestFragmentsPhrase() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("\"John Kennedy\"");
@@ -742,6 +778,7 @@
   public void testGetBestFragmentsQueryScorer() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         SpanQuery clauses[] = { new SpanTermQuery(new Term("contents", "john")),
@@ -762,6 +799,7 @@
   public void testOffByOne() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         TermQuery query = new TermQuery(new Term("data", "help"));
         Highlighter hg = new Highlighter(new SimpleHTMLFormatter(), new QueryTermScorer(query));
@@ -780,6 +818,7 @@
   public void testGetBestFragmentsFilteredQuery() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         TermRangeFilter rf = new TermRangeFilter("contents", "john", "john", true, true);
@@ -802,6 +841,7 @@
   public void testGetBestFragmentsFilteredPhraseQuery() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         TermRangeFilter rf = new TermRangeFilter("contents", "john", "john", true, true);
@@ -824,6 +864,7 @@
   public void testGetBestFragmentsMultiTerm() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("John Kenn*");
@@ -839,6 +880,7 @@
   public void testGetBestFragmentsWithOr() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("JFK OR Kennedy");
@@ -854,6 +896,7 @@
 
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         doSearching("Kennedy");
         numHighlights = 0;
@@ -905,6 +948,7 @@
 
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         WeightedSpanTerm[] wTerms = new WeightedSpanTerm[2];
         wTerms[0] = new WeightedSpanTerm(10f, "hello");
@@ -950,6 +994,7 @@
   public void testOverlapAnalyzer() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         HashMap synonyms = new HashMap();
         synonyms.put("football", "soccer,footie");
@@ -982,6 +1027,7 @@
   public void testGetSimpleHighlight() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("Kennedy");
@@ -1005,6 +1051,7 @@
   public void testGetTextFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
 
         doSearching("Kennedy");
@@ -1041,6 +1088,7 @@
   public void testMaxSizeHighlight() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         doSearching("meat");
@@ -1063,6 +1111,7 @@
   public void testMaxSizeHighlightTruncates() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         String goodWord = "goodtoken";
         Set stopWords = new HashSet(1);
@@ -1108,6 +1157,7 @@
   
   public void testMaxSizeEndHighlight() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
+      @Override
       public void run() throws Exception {
         Set stopWords = new HashSet();
         stopWords.add("in");
@@ -1132,6 +1182,7 @@
   public void testUnRewrittenQuery() throws Exception {
     final TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         numHighlights = 0;
         // test to show how rewritten query can still be used
@@ -1179,6 +1230,7 @@
   public void testNoFragments() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         doSearching("AnInvalidQueryWhichShouldYieldNoResults");
 
@@ -1303,6 +1355,7 @@
   public void testFieldSpecificHighlighting() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         String docMainText = "fred is one of the people";
         QueryParser parser = new QueryParser(TEST_VERSION, FIELD_NAME, analyzer);
@@ -1376,6 +1429,7 @@
         iter = lst.iterator();
       }
 
+      @Override
       public boolean incrementToken() throws IOException {
         if(iter.hasNext()) {
           Token token = (Token) iter.next();
@@ -1423,6 +1477,7 @@
         iter = lst.iterator();
       }
 
+      @Override
       public boolean incrementToken() throws IOException {
         if(iter.hasNext()) {
           Token token = (Token) iter.next();
@@ -1439,6 +1494,7 @@
   public void testOverlapAnalyzer2() throws Exception {
     TestHighlightRunner helper = new TestHighlightRunner() {
 
+      @Override
       public void run() throws Exception {
         String s = "Hi-Speed10 foo";
 
@@ -1637,6 +1693,7 @@
     }
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     ramDir = new RAMDirectory();
@@ -1678,6 +1735,7 @@
 
   }
 
+  @Override
   protected void tearDown() throws Exception {
     super.tearDown();
   }
@@ -1714,6 +1772,7 @@
    * @see org.apache.lucene.analysis.Analyzer#tokenStream(java.lang.String,
    *      java.io.Reader)
    */
+  @Override
   public TokenStream tokenStream(String arg0, Reader arg1) {
     LowerCaseTokenizer stream = new LowerCaseTokenizer(arg1);
     stream.addAttribute(TermAttribute.class);
@@ -1752,6 +1811,7 @@
     offsetAtt = addAttribute(OffsetAttribute.class);
   }
 
+  @Override
   public boolean incrementToken() throws IOException {
 
     if (currentRealToken == null) {

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java Mon Nov  9 04:01:50 2009
@@ -42,6 +42,7 @@
     this.fieldName = fieldName;
   }
 
+  @Override
   public boolean equals(Object o) {
     if (this == o)
       return true;
@@ -54,6 +55,7 @@
 
   }
 
+  @Override
   public int hashCode() {
     return fieldName.hashCode();
   }

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java Mon Nov  9 04:01:50 2009
@@ -73,6 +73,7 @@
   }
 
 
+  @Override
   public String toString() {
     return document.toString();
   }



Mime
View raw message