lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r634671 - /lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp
Date Fri, 07 Mar 2008 13:42:46 GMT
Author: yonik
Date: Fri Mar  7 05:42:45 2008
New Revision: 634671

URL: http://svn.apache.org/viewvc?rev=634671&view=rev
Log:
fix handling of null token type in analysis.jsp

Modified:
    lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp

Modified: lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp?rev=634671&r1=634670&r2=634671&view=diff
==============================================================================
--- lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp (original)
+++ lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp Fri Mar  7 05:42:45 2008
@@ -372,8 +372,7 @@
     if (needRaw) {
       printRow(out,"raw text", arr, new ToStr() {
         public String toStr(Object o) {
-          // todo: output in hex or something?
-          // check if it's all ascii or not?
+          // page is UTF-8, so anything goes.
           return ((Tok)o).token.termText();
         }
       }
@@ -386,7 +385,12 @@
     if (verbose) {
       printRow(out,"term type", arr, new ToStr() {
         public String toStr(Object o) {
-          return  ((Tok)o).token.type();
+          String tt =  ((Tok)o).token.type();
+          if (tt == null) {
+             return "null";
+          } else {
+             return tt;
+          }
         }
       }
               ,true



Mime
View raw message