lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r168478 - /lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java /lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
Date Fri, 06 May 2005 00:26:09 GMT
Author: ehatcher
Date: Thu May  5 17:26:08 2005
New Revision: 168478

URL: http://svn.apache.org/viewcvs?rev=168478&view=rev
Log:
adjust code to fix compile/javadoc errors on JDK 1.5

Modified:
    lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
    lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java

Modified: lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java?rev=168478&r1=168477&r2=168478&view=diff
==============================================================================
--- lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
(original)
+++ lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
Thu May  5 17:26:08 2005
@@ -1,5 +1,5 @@
 /**
- * Copyright 2004 The Apache Software Foundation.
+ * Copyright 2004-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,16 +15,35 @@
  */
 package org.apache.lucene.search.similar;
 
-import java.io.*;
-import java.util.*;
-import java.net.*;
+import org.apache.lucene.util.PriorityQueue;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.index.TermFreqVector;
+import org.apache.lucene.search.DefaultSimilarity;
+import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.TermQuery;
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.Hits;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.document.Document;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Collection;
+import java.util.Iterator;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.File;
+import java.io.PrintStream;
+import java.io.StringReader;
+import java.io.FileReader;
+import java.io.InputStreamReader;
+import java.net.URL;
 
-import org.apache.lucene.analysis.*;
-import org.apache.lucene.analysis.standard.*;
-import org.apache.lucene.document.*;
-import org.apache.lucene.search.*;
-import org.apache.lucene.index.*;
-import org.apache.lucene.util.*;
 
 /**
  * Generate "more like this" similarity queries. 

Modified: lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java?rev=168478&r1=168477&r2=168478&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
(original)
+++ lucene/java/trunk/contrib/spellchecker/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
Thu May  5 17:26:08 2005
@@ -45,13 +45,13 @@
 
 
   final class LuceneIterator implements Iterator {
-    private TermEnum enum;
+    private TermEnum termEnum;
     private Term actualTerm;
     private boolean has_next_called;
 
     public LuceneIterator() {
       try {
-        enum = reader.terms(new Term(field, ""));
+        termEnum = reader.terms(new Term(field, ""));
       } catch (IOException ex) {
         ex.printStackTrace();
       }
@@ -71,12 +71,12 @@
       has_next_called = true;
       try {
         // if there is still words
-        if (!enum.next()) {
+        if (!termEnum.next()) {
           actualTerm = null;
           return false;
         }
         //  if the next word are in the field
-        actualTerm = enum.term();
+        actualTerm = termEnum.term();
         String fieldt = actualTerm.field();
         if (fieldt != field) {
           actualTerm = null;



Mime
View raw message