lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dspen...@apache.org
Subject svn commit: r169365 - /lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
Date Mon, 09 May 2005 21:36:22 GMT
Author: dspencer
Date: Mon May  9 14:36:22 2005
New Revision: 169365

URL: http://svn.apache.org/viewcvs?rev=169365&view=rev
Log:
cleanup deprecated warnings so it compiles cleanly w/ the current lucene code, lucene-core-1.9-rc1-dev.jar

Modified:
    lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.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=169365&r1=169364&r2=169365&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
Mon May  9 14:36:22 2005
@@ -19,6 +19,7 @@
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermFreqVector;
+import org.apache.lucene.search.BooleanClause;	
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.Similarity;
 import org.apache.lucene.search.TermQuery;
@@ -464,7 +465,7 @@
     public Query like(int docNum) throws IOException {
         if (fieldNames == null) {
             // gather list of valid fields from lucene
-            Collection fields = ir.getFieldNames(true);
+            Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED);
             fieldNames = (String[]) fields.toArray(new String[fields.size()]);
         }
 
@@ -479,7 +480,7 @@
     public Query like(File f) throws IOException {
         if (fieldNames == null) {
             // gather list of valid fields from lucene
-            Collection fields = ir.getFieldNames(true);
+            Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED);
             fieldNames = (String[]) fields.toArray(new String[fields.size()]);
         }
 
@@ -536,7 +537,7 @@
             }
 
             try {
-                query.add(tq, false, false);
+                query.add(tq, BooleanClause.Occur.SHOULD);
             }
             catch (BooleanQuery.TooManyClauses ignore) {
                 break;



Mime
View raw message