You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2007/03/01 06:46:34 UTC
svn commit: r513152 - in /lucene/solr/trunk: CHANGES.txt
src/webapp/resources/admin/analysis.jsp
Author: yonik
Date: Wed Feb 28 21:46:34 2007
New Revision: 513152
URL: http://svn.apache.org/viewvc?view=rev&rev=513152
Log:
fix display of multiple tokens at same position: SOLR-168
Modified:
lucene/solr/trunk/CHANGES.txt
lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp
Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?view=diff&rev=513152&r1=513151&r2=513152
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Wed Feb 28 21:46:34 2007
@@ -172,6 +172,9 @@
when finished. Also modified ResponseWriters to only fetch a Searcher
reference if necessary for writing out DocLists.
(Ryan McKinley via hossman)
+
+ 7. SOLR-168: Fix display positioning of multiple tokens at the same
+ position in analysis.jsp (yonik)
Other Changes
1. Updated to Lucene 2.1
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?view=diff&rev=513152&r1=513151&r2=513152
==============================================================================
--- lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp (original)
+++ lucene/solr/trunk/src/webapp/resources/admin/analysis.jsp Wed Feb 28 21:46:34 2007
@@ -249,7 +249,8 @@
}
}
- for (List<Tok> lst : arrLst) {
+ for (int posIndex=0; posIndex<arrLst.length; posIndex++) {
+ List<Tok> lst = arrLst[posIndex];
if (lst.size() <= idx) continue;
if (match!=null && match.contains(lst.get(idx))) {
out.print("<td class=\"highlight\"");
@@ -257,8 +258,10 @@
out.print("<td class=\"debugdata\"");
}
- if (idx==0 && lst.size()==1 && maxSz > 1) {
- out.print("rowspan=\""+maxSz+'"');
+ // if the last value in the column, use up
+ // the rest of the space via rowspan.
+ if (lst.size() == idx+1 && lst.size() < maxSz) {
+ out.print("rowspan=\""+(maxSz-lst.size()+1)+'"');
}
out.print('>');
@@ -309,25 +312,11 @@
List<Tok>[] arr = (List<Tok>[])map.values().toArray(new ArrayList[map.size()]);
- /***
- // This generics version works fine with Resin, but fails with Tomcat 5.5
- // with java.lang.AbstractMethodError
- // at java.util.Arrays.mergeSort(Arrays.java:1284)
- // at java.util.Arrays.sort(Arrays.java:1223)
Arrays.sort(arr, new Comparator<List<Tok>>() {
public int compare(List<Tok> toks, List<Tok> toks1) {
return toks.get(0).pos - toks1.get(0).pos;
}
}
- ***/
- Arrays.sort(arr, new Comparator() {
- public int compare(Object a, Object b) {
- List<Tok> toks = (List<Tok>)a;
- List<Tok> toks1 = (List<Tok>)b;
- return toks.get(0).pos - toks1.get(0).pos;
- }
- }
-
);
out.println("<table width=\"auto\" class=\"analysis\" border=\"1\">");