lucene-java-commits mailing list archives

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

URL: http://svn.apache.org/viewcvs?rev=169366&view=rev
Log:
don't print out summary unless it's present

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=169366&r1=169365&r2=169366&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:37:50 2005
@@ -675,10 +675,12 @@
         o.println();
         for (int i = 0; i < Math.min(25, len); i++) {
             Document d = hits.doc(i);
+			String summary = d.get( "summary");
             o.println("score  : " + hits.score(i));
             o.println("url    : " + d.get("url"));
             o.println("\ttitle  : " + d.get("title"));
-            o.println("\tsummary: " + d.get("summary"));
+			if ( summary != null)
+				o.println("\tsummary: " + d.get("summary"));
             o.println();
         }
     }



Mime
View raw message