You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/06/25 01:07:38 UTC

svn commit: r1139458 [22/24] - in /lucene/dev/branches/solr2193: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/ dev-tools/idea/solr/ dev-tools/idea/solr/contrib/clustering/ dev-tools/maven/ dev-tools/maven/modules/analysis/icu/ dev-...

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java Fri Jun 24 23:07:10 2011
@@ -35,7 +35,7 @@ import java.util.List;
 /**
  * A test for {@link FieldAnalysisRequestHandler}.
  *
- * @version $Id$
+ *
  * @since solr 1.4
  */
 public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestBase {
@@ -139,64 +139,64 @@ public class FieldAnalysisRequestHandler
     List<NamedList> tokenList = indexPart.get("org.apache.lucene.analysis.standard.StandardTokenizer");
     assertNotNull("Expcting StandardTokenizer analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 10);
-    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, null, false));
-    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, null, true));
-    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, null, false));
-    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, null, false));
-    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, null, true));
-    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, new int[]{2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, new int[]{3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, new int[]{4}, null, true));
+    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, new int[]{5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, new int[]{6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, new int[]{7}, null, false));
+    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, new int[]{8}, null, false));
+    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, new int[]{9}, null, true));
+    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, new int[]{10}, null, false));
     tokenList = indexPart.get("org.apache.lucene.analysis.standard.StandardFilter");
     assertNotNull("Expcting StandardFilter analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 10);
-    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, null, false));
-    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, null, true));
-    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, null, false));
-    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, null, false));
-    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, null, true));
-    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, new int[]{3,3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, new int[]{4,4}, null, true));
+    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, new int[]{5,5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, new int[]{6,6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, new int[]{7,7}, null, false));
+    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, new int[]{8,8}, null, false));
+    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, new int[]{9,9}, null, true));
+    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, new int[]{10,10}, null, false));
     tokenList = indexPart.get("org.apache.lucene.analysis.core.LowerCaseFilter");
     assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 10);
-    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, null, false));
-    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, null, true));
-    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, null, false));
-    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, null, false));
-    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, null, true));
-    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 3, new int[]{3,3,3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 4, new int[]{4,4,4}, null, true));
+    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 5, new int[]{5,5,5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 6, new int[]{6,6,6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("the", null, "<ALPHANUM>", 30, 33, 7, new int[]{7,7,7}, null, false));
+    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 8, new int[]{8,8,8}, null, false));
+    assertToken(tokenList.get(8), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 9, new int[]{9,9,9}, null, true));
+    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 10, new int[]{10,10,10}, null, false));
     tokenList = indexPart.get("org.apache.lucene.analysis.core.StopFilter");
     assertNotNull("Expcting StopFilter analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 8);
-    assertToken(tokenList.get(0), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 3, null, true));
-    assertToken(tokenList.get(3), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 4, null, false));
-    assertToken(tokenList.get(4), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 7, null, true));
-    assertToken(tokenList.get(7), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 8, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 1, new int[]{2,2,2,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 2, new int[]{3,3,3,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 3, new int[]{4,4,4,3}, null, true));
+    assertToken(tokenList.get(3), new TokenInfo("jumped", null, "<ALPHANUM>", 18, 24, 4, new int[]{5,5,5,4}, null, false));
+    assertToken(tokenList.get(4), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 5, new int[]{6,6,6,5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("lazy", null, "<ALPHANUM>", 34, 38, 6, new int[]{8,8,8,6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 7, new int[]{9,9,9,7}, null, true));
+    assertToken(tokenList.get(7), new TokenInfo("dogs", null, "<ALPHANUM>", 45, 49, 8, new int[]{10,10,10,8}, null, false));
     tokenList = indexPart.get("org.apache.lucene.analysis.en.PorterStemFilter");
     assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 8);
-    assertToken(tokenList.get(0), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 3, null, true));
-    assertToken(tokenList.get(3), new TokenInfo("jump", null, "<ALPHANUM>", 18, 24, 4, null, false));
-    assertToken(tokenList.get(4), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("lazi", null, "<ALPHANUM>", 34, 38, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 7, null, true));
-    assertToken(tokenList.get(7), new TokenInfo("dog", null, "<ALPHANUM>", 45, 49, 8, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("quick", null, "<ALPHANUM>", 4, 9, 1, new int[]{2,2,2,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("red", null, "<ALPHANUM>", 10, 13, 2, new int[]{3,3,3,2,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("fox", null, "<ALPHANUM>", 14, 17, 3, new int[]{4,4,4,3,3}, null, true));
+    assertToken(tokenList.get(3), new TokenInfo("jump", null, "<ALPHANUM>", 18, 24, 4, new int[]{5,5,5,4,4}, null, false));
+    assertToken(tokenList.get(4), new TokenInfo("over", null, "<ALPHANUM>", 25, 29, 5, new int[]{6,6,6,5,5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("lazi", null, "<ALPHANUM>", 34, 38, 6, new int[]{8,8,8,6,6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("brown", null, "<ALPHANUM>", 39, 44, 7, new int[]{9,9,9,7,7}, null, true));
+    assertToken(tokenList.get(7), new TokenInfo("dog", null, "<ALPHANUM>", 45, 49, 8, new int[]{10,10,10,8,8}, null, false));
 
     NamedList<List<NamedList>> queryPart = textType.get("query");
     assertNotNull("expecting a query token analysis for field type 'text'", queryPart);
@@ -204,28 +204,28 @@ public class FieldAnalysisRequestHandler
     tokenList = queryPart.get("org.apache.lucene.analysis.standard.StandardTokenizer");
     assertNotNull("Expecting StandardTokenizer analysis breakdown", tokenList);
     assertEquals("Expecting StandardTokenizer to produce 2 tokens from '" + request.getQuery() + "'", 2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[]{2}, null, false));
     tokenList = queryPart.get("org.apache.lucene.analysis.standard.StandardFilter");
     assertNotNull("Expcting StandardFilter analysis breakdown", tokenList);
     assertEquals(2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2}, null, false));
     tokenList = queryPart.get("org.apache.lucene.analysis.core.LowerCaseFilter");
     assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList);
     assertEquals(2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2,2}, null, false));
     tokenList = queryPart.get("org.apache.lucene.analysis.core.StopFilter");
     assertNotNull("Expcting StopFilter analysis breakdown", tokenList);
     assertEquals(2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2,2,2}, null, false));
     tokenList = queryPart.get("org.apache.lucene.analysis.en.PorterStemFilter");
     assertNotNull("Expcting PorterStemFilter analysis breakdown", tokenList);
     assertEquals(2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "<ALPHANUM>", 0, 3, 1, new int[]{1,1,1,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "<ALPHANUM>", 4, 9, 2, new int[]{2,2,2,2,2}, null, false));
 
     NamedList<NamedList> nameTextType = fieldTypes.get("nametext");
     assertNotNull("expecting result for field type 'nametext'", nameTextType);
@@ -236,22 +236,22 @@ public class FieldAnalysisRequestHandler
     tokenList = indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer");
     assertNotNull("Expcting WhitespaceTokenizer analysis breakdown", tokenList);
     assertEquals(10, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("quick", null, "word", 4, 9, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("red", null, "word", 10, 13, 3, null, false));
-    assertToken(tokenList.get(3), new TokenInfo("fox", null, "word", 14, 17, 4, null, true));
-    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "word", 18, 24, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("over", null, "word", 25, 29, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("the", null, "word", 30, 33, 7, null, false));
-    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "word", 34, 38, 8, null, false));
-    assertToken(tokenList.get(8), new TokenInfo("brown", null, "word", 39, 44, 9, null, true));
-    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "word", 45, 49, 10, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("quick", null, "word", 4, 9, 2, new int[]{2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("red", null, "word", 10, 13, 3, new int[]{3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("fox", null, "word", 14, 17, 4, new int[]{4}, null, true));
+    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "word", 18, 24, 5, new int[]{5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("over", null, "word", 25, 29, 6, new int[]{6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("the", null, "word", 30, 33, 7, new int[]{7}, null, false));
+    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "word", 34, 38, 8, new int[]{8}, null, false));
+    assertToken(tokenList.get(8), new TokenInfo("brown", null, "word", 39, 44, 9, new int[]{9}, null, true));
+    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "word", 45, 49, 10, new int[]{10}, null, false));
 
     queryPart = nameTextType.get("query");
     assertNotNull("expecting a query token analysis for field type 'nametext'", queryPart);
     tokenList = queryPart.get(WhitespaceTokenizer.class.getName());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "word", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "word", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "word", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "word", 4, 9, 2, new int[]{2}, null, false));
 
     NamedList<NamedList> fieldNames = result.get("field_names");
     assertNotNull("field_nameds should never be null", fieldNames);
@@ -265,16 +265,16 @@ public class FieldAnalysisRequestHandler
     tokenList = indexPart.get(WhitespaceTokenizer.class.getName());
     assertNotNull("expecting only WhitespaceTokenizer to be applied", tokenList);
     assertEquals("expecting WhitespaceTokenizer to produce 10 tokens", 10, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("quick", null, "word", 4, 9, 2, null, false));
-    assertToken(tokenList.get(2), new TokenInfo("red", null, "word", 10, 13, 3, null, false));
-    assertToken(tokenList.get(3), new TokenInfo("fox", null, "word", 14, 17, 4, null, true));
-    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "word", 18, 24, 5, null, false));
-    assertToken(tokenList.get(5), new TokenInfo("over", null, "word", 25, 29, 6, null, false));
-    assertToken(tokenList.get(6), new TokenInfo("the", null, "word", 30, 33, 7, null, false));
-    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "word", 34, 38, 8, null, false));
-    assertToken(tokenList.get(8), new TokenInfo("brown", null, "word", 39, 44, 9, null, true));
-    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "word", 45, 49, 10, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the", null, "word", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("quick", null, "word", 4, 9, 2, new int[]{2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("red", null, "word", 10, 13, 3, new int[]{3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("fox", null, "word", 14, 17, 4, new int[]{4}, null, true));
+    assertToken(tokenList.get(4), new TokenInfo("jumped", null, "word", 18, 24, 5, new int[]{5}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("over", null, "word", 25, 29, 6, new int[]{6}, null, false));
+    assertToken(tokenList.get(6), new TokenInfo("the", null, "word", 30, 33, 7, new int[]{7}, null, false));
+    assertToken(tokenList.get(7), new TokenInfo("lazy", null, "word", 34, 38, 8, new int[]{8}, null, false));
+    assertToken(tokenList.get(8), new TokenInfo("brown", null, "word", 39, 44, 9, new int[]{9}, null, true));
+    assertToken(tokenList.get(9), new TokenInfo("dogs", null, "word", 45, 49, 10, new int[]{10}, null, false));
 
     queryPart = whitetok.get("query");
     assertNotNull("expecting a query token analysis for field 'whitetok'", queryPart);
@@ -282,8 +282,8 @@ public class FieldAnalysisRequestHandler
     tokenList = queryPart.get(WhitespaceTokenizer.class.getName());
     assertNotNull("expecting only WhitespaceTokenizer to be applied", tokenList);
     assertEquals("expecting WhitespaceTokenizer to produce 2 tokens", 2, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox", null, "word", 0, 3, 1, null, false));
-    assertToken(tokenList.get(1), new TokenInfo("brown", null, "word", 4, 9, 2, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox", null, "word", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("brown", null, "word", 4, 9, 2, new int[]{2}, null, false));
 
     NamedList<NamedList> keywordtok = fieldNames.get("keywordtok");
     assertNotNull("expecting result for field 'keywordtok'", keywordtok);
@@ -294,7 +294,7 @@ public class FieldAnalysisRequestHandler
     tokenList = indexPart.get(KeywordTokenizer.class.getName());
     assertNotNull("expecting only KeywordTokenizer to be applied", tokenList);
     assertEquals("expecting KeywordTokenizer to produce 1 token", 1, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("the quick red fox jumped over the lazy brown dogs", null, "word", 0, 49, 1, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("the quick red fox jumped over the lazy brown dogs", null, "word", 0, 49, 1, new int[]{1}, null, false));
 
     queryPart = keywordtok.get("query");
     assertNotNull("expecting a query token analysis for field 'keywordtok'", queryPart);
@@ -302,7 +302,7 @@ public class FieldAnalysisRequestHandler
     tokenList = queryPart.get(KeywordTokenizer.class.getName());
     assertNotNull("expecting only KeywordTokenizer to be applied", tokenList);
     assertEquals("expecting KeywordTokenizer to produce 1 token", 1, tokenList.size());
-    assertToken(tokenList.get(0), new TokenInfo("fox brown", null, "word", 0, 9, 1, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("fox brown", null, "word", 0, 9, 1, new int[]{1}, null, false));
 
   }
 
@@ -331,6 +331,53 @@ public class FieldAnalysisRequestHandler
     List<NamedList> tokenList = (List<NamedList>)indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer");
     assertNotNull("Expecting WhitespaceTokenizer analysis breakdown", tokenList);
     assertEquals(tokenList.size(), 1);
-    assertToken(tokenList.get(0), new TokenInfo("whatever", null, "word", 12, 20, 1, null, false));
+    assertToken(tokenList.get(0), new TokenInfo("whatever", null, "word", 12, 20, 1, new int[]{1}, null, false));
+  }
+  
+  @Test
+  public void testPositionHistoryWithWDF() throws Exception {
+
+    FieldAnalysisRequest request = new FieldAnalysisRequest();
+    request.addFieldType("skutype1");
+    request.setFieldValue("hi, 3456-12 a Test");
+    request.setShowMatch(false);
+
+    NamedList<NamedList> result = handler.handleAnalysisRequest(request, h.getCore().getSchema());
+    assertTrue("result is null and it shouldn't be", result != null);
+
+    NamedList<NamedList> fieldTypes = result.get("field_types");
+    assertNotNull("field_types should never be null", fieldTypes);
+    NamedList<NamedList> textType = fieldTypes.get("skutype1");
+    assertNotNull("expecting result for field type 'skutype1'", textType);
+
+    NamedList<List<NamedList>> indexPart = textType.get("index");
+    assertNotNull("expecting an index token analysis for field type 'skutype1'", indexPart);
+
+    List<NamedList> tokenList = indexPart.get("org.apache.lucene.analysis.core.WhitespaceTokenizer");
+    assertNotNull("Expcting WhitespaceTokenizer analysis breakdown", tokenList);
+    assertEquals(4, tokenList.size());
+    assertToken(tokenList.get(0), new TokenInfo("hi,", null, "word", 0, 3, 1, new int[]{1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("3456-12", null, "word", 4, 11, 2, new int[]{2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("a", null, "word", 12, 13, 3, new int[]{3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("Test", null, "word", 14, 18, 4, new int[]{4}, null, false));
+    tokenList = indexPart.get("org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter");
+    assertNotNull("Expcting WordDelimiterFilter analysis breakdown", tokenList);
+    assertEquals(6, tokenList.size());
+    assertToken(tokenList.get(0), new TokenInfo("hi", null, "word", 0, 2, 1, new int[]{1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("3456", null, "word", 4, 8, 2, new int[]{2,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("12", null, "word", 9, 11, 3, new int[]{2,3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("345612", null, "word", 4, 11, 3, new int[]{2,3}, null, false));
+    assertToken(tokenList.get(4), new TokenInfo("a", null, "word", 12, 13, 4, new int[]{3,4}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("Test", null, "word", 14, 18, 5, new int[]{4,5}, null, false));
+    tokenList = indexPart.get("org.apache.lucene.analysis.core.LowerCaseFilter");
+    assertNotNull("Expcting LowerCaseFilter analysis breakdown", tokenList);
+    assertEquals(6, tokenList.size());
+    assertToken(tokenList.get(0), new TokenInfo("hi", null, "word", 0, 2, 1, new int[]{1,1,1}, null, false));
+    assertToken(tokenList.get(1), new TokenInfo("3456", null, "word", 4, 8, 2, new int[]{2,2,2}, null, false));
+    assertToken(tokenList.get(2), new TokenInfo("12", null, "word", 9, 11, 3, new int[]{2,3,3}, null, false));
+    assertToken(tokenList.get(3), new TokenInfo("345612", null, "word", 4, 11, 3, new int[]{2,3,3}, null, false));
+    assertToken(tokenList.get(4), new TokenInfo("a", null, "word", 12, 13, 4, new int[]{3,4,4}, null, false));
+    assertToken(tokenList.get(5), new TokenInfo("test", null, "word", 14, 18, 5, new int[]{4,5,5}, null, false));
   }
+  
 }

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java Fri Jun 24 23:07:10 2011
@@ -50,7 +50,7 @@ import java.util.HashMap;
 /**
  * Test for ReplicationHandler
  *
- * @version $Id$
+ *
  * @since 1.4
  */
 public class TestReplicationHandler extends SolrTestCaseJ4 {

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java Fri Jun 24 23:07:10 2011
@@ -25,7 +25,7 @@ import org.apache.solr.common.params.Mod
  * Test for SpellCheckComponent's distributed querying
  *
  * @since solr 1.5
- * @version $Id$
+ *
  * @see org.apache.solr.handler.component.SpellCheckComponent
  */
 public class DistributedSpellCheckComponentTest extends BaseDistributedSearchTestCase {

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java Fri Jun 24 23:07:10 2011
@@ -22,7 +22,7 @@ import org.apache.solr.BaseDistributedSe
 /**
  * Test for TermsComponent distributed querying
  *
- * @version $Id$
+ *
  * @since solr 1.5
  */
 public class DistributedTermsComponentTest extends BaseDistributedSearchTestCase {

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java Fri Jun 24 23:07:10 2011
@@ -21,10 +21,15 @@ import java.io.File;
 import java.util.*;
 
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.params.CommonParams;
+import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SpellingParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.core.SolrCore;
+import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.request.SolrRequestHandler;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.spelling.AbstractLuceneSpellChecker;
 import org.junit.BeforeClass;
@@ -188,4 +193,58 @@ public class SpellCheckComponentTest ext
     
     assertQ(req, "//arr[@name='suggestion'][.='lucenejava']");
   }
+    
+    @Test
+    public void testThresholdTokenFrequency() throws Exception {
+    	
+  	  	//"document" is in 2 documents but "another" is only in 1.  
+  	  	//So with a threshold of 29%, "another" is absent from the dictionary 
+  	  	//while "document" is present.
+    	
+  	  	assertJQ(req("qt",rh, SpellCheckComponent.COMPONENT_NAME, "true", "q","documenq", SpellCheckComponent.SPELLCHECK_DICT, "threshold", SpellCheckComponent.SPELLCHECK_COUNT,"5", SpellCheckComponent.SPELLCHECK_EXTENDED_RESULTS,"true")
+  	        ,"/spellcheck/suggestions/[1]/suggestion==[{'word':'document','freq':2}]"
+  	    );
+  	  	
+  	  	assertJQ(req("qt",rh, SpellCheckComponent.COMPONENT_NAME, "true", "q","documenq", SpellCheckComponent.SPELLCHECK_DICT, "threshold_direct", SpellCheckComponent.SPELLCHECK_COUNT,"5", SpellCheckComponent.SPELLCHECK_EXTENDED_RESULTS,"true")
+  	        ,"/spellcheck/suggestions/[1]/suggestion==[{'word':'document','freq':2}]"
+  	    );
+  	  	
+  	  	//TODO:  how do we make this into a 1-liner using "assertQ()" ???
+  	  	SolrCore core = h.getCore();
+  	  	SearchComponent speller = core.getSearchComponent("spellcheck");
+  	  	assertTrue("speller is null and it shouldn't be", speller != null);
+  	  	
+  	  	ModifiableSolrParams params = new ModifiableSolrParams();		
+  			params.add(SpellCheckComponent.COMPONENT_NAME, "true");
+  			params.add(SpellCheckComponent.SPELLCHECK_COUNT, "10");	
+  			params.add(SpellCheckComponent.SPELLCHECK_DICT, "threshold");
+  			params.add(SpellCheckComponent.SPELLCHECK_EXTENDED_RESULTS,"true");
+  			params.add(CommonParams.Q, "anotheq");
+  			
+  			SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+  			SolrQueryResponse rsp = new SolrQueryResponse();
+  			rsp.add("responseHeader", new SimpleOrderedMap());
+  			SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
+  			handler.handleRequest(req, rsp);
+  			req.close();
+  			NamedList values = rsp.getValues();
+  			NamedList spellCheck = (NamedList) values.get("spellcheck");
+  			NamedList suggestions = (NamedList) spellCheck.get("suggestions");
+  			assertTrue(suggestions.get("suggestion")==null);
+  			assertTrue((Boolean) suggestions.get("correctlySpelled")==false);
+  			
+  			params.remove(SpellCheckComponent.SPELLCHECK_DICT);
+  			params.add(SpellCheckComponent.SPELLCHECK_DICT, "threshold_direct");
+  			rsp = new SolrQueryResponse();
+  			rsp.add("responseHeader", new SimpleOrderedMap());
+  			req = new LocalSolrQueryRequest(core, params);
+  			handler.handleRequest(req, rsp);
+  			req.close();
+  			values = rsp.getValues();
+  			spellCheck = (NamedList) values.get("spellcheck");
+  			suggestions = (NamedList) spellCheck.get("suggestions");
+  			assertTrue(suggestions.get("suggestion")==null);
+  			
+  			assertTrue((Boolean) suggestions.get("correctlySpelled")==false);
+    }
 }

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestBinaryResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestBinaryResponseWriter.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestBinaryResponseWriter.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestBinaryResponseWriter.java Fri Jun 24 23:07:10 2011
@@ -33,7 +33,7 @@ import java.util.UUID;
 /**
  * Test for BinaryResponseWriter
  *
- * @version $Id$
+ *
  * @since solr 1.4
  */
 public class TestBinaryResponseWriter extends AbstractSolrTestCase {

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestFaceting.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestFaceting.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/request/TestFaceting.java Fri Jun 24 23:07:10 2011
@@ -30,7 +30,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
- * @version $Id$
+ *
  */
 public class TestFaceting extends SolrTestCaseJ4 {
   @BeforeClass

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/QueryParsingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/QueryParsingTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/QueryParsingTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/QueryParsingTest.java Fri Jun 24 23:07:10 2011
@@ -46,57 +46,57 @@ public class QueryParsingTest extends So
 
     sort = QueryParsing.parseSort("score asc", req);
     SortField[] flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.SCORE);
+    assertEquals(flds[0].getType(), SortField.Type.SCORE);
     assertTrue(flds[0].getReverse());
 
     sort = QueryParsing.parseSort("weight desc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
     assertEquals(flds[0].getReverse(), true);
     sort = QueryParsing.parseSort("weight desc,bday asc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
     assertEquals(flds[0].getReverse(), true);
-    assertEquals(flds[1].getType(), SortField.LONG);
+    assertEquals(flds[1].getType(), SortField.Type.LONG);
     assertEquals(flds[1].getField(), "bday");
     assertEquals(flds[1].getReverse(), false);
     //order aliases
     sort = QueryParsing.parseSort("weight top,bday asc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
     assertEquals(flds[0].getReverse(), true);
-    assertEquals(flds[1].getType(), SortField.LONG);
+    assertEquals(flds[1].getType(), SortField.Type.LONG);
     assertEquals(flds[1].getField(), "bday");
     assertEquals(flds[1].getReverse(), false);
     sort = QueryParsing.parseSort("weight top,bday bottom", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
     assertEquals(flds[0].getReverse(), true);
-    assertEquals(flds[1].getType(), SortField.LONG);
+    assertEquals(flds[1].getType(), SortField.Type.LONG);
     assertEquals(flds[1].getField(), "bday");
     assertEquals(flds[1].getReverse(), false);
 
     //test weird spacing
     sort = QueryParsing.parseSort("weight         desc,            bday         asc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
     assertEquals(flds[1].getField(), "bday");
-    assertEquals(flds[1].getType(), SortField.LONG);
+    assertEquals(flds[1].getType(), SortField.Type.LONG);
     //handles trailing commas
     sort = QueryParsing.parseSort("weight desc,", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
 
     //test functions
     sort = QueryParsing.parseSort("pow(weight, 2) desc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.CUSTOM);
+    assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
     //Not thrilled about the fragility of string matching here, but...
     //the value sources get wrapped, so the out field is different than the input
     assertEquals(flds[0].getField(), "pow(float(weight),const(2))");
@@ -104,12 +104,12 @@ public class QueryParsingTest extends So
     //test functions (more deep)
     sort = QueryParsing.parseSort("sum(product(r_f1,sum(d_f1,t_f1,1.0)),a_f1) asc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.CUSTOM);
+    assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
     assertEquals(flds[0].getField(), "sum(product(float(r_f1),sum(float(d_f1),float(t_f1),const(1.0))),float(a_f1))");
 
     sort = QueryParsing.parseSort("pow(weight,                 2.0)         desc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.CUSTOM);
+    assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
     //Not thrilled about the fragility of string matching here, but...
     //the value sources get wrapped, so the out field is different than the input
     assertEquals(flds[0].getField(), "pow(float(weight),const(2.0))");
@@ -117,27 +117,27 @@ public class QueryParsingTest extends So
 
     sort = QueryParsing.parseSort("pow(weight, 2.0) desc, weight    desc,   bday    asc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.CUSTOM);
+    assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
 
     //Not thrilled about the fragility of string matching here, but...
     //the value sources get wrapped, so the out field is different than the input
     assertEquals(flds[0].getField(), "pow(float(weight),const(2.0))");
 
-    assertEquals(flds[1].getType(), SortField.FLOAT);
+    assertEquals(flds[1].getType(), SortField.Type.FLOAT);
     assertEquals(flds[1].getField(), "weight");
     assertEquals(flds[2].getField(), "bday");
-    assertEquals(flds[2].getType(), SortField.LONG);
+    assertEquals(flds[2].getType(), SortField.Type.LONG);
     
     //handles trailing commas
     sort = QueryParsing.parseSort("weight desc,", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.FLOAT);
+    assertEquals(flds[0].getType(), SortField.Type.FLOAT);
     assertEquals(flds[0].getField(), "weight");
 
     //Test literals in functions
     sort = QueryParsing.parseSort("strdist(foo_s1, \"junk\", jw) desc", req);
     flds = sort.getSort();
-    assertEquals(flds[0].getType(), SortField.CUSTOM);
+    assertEquals(flds[0].getType(), SortField.Type.REWRITEABLE);
     //the value sources get wrapped, so the out field is different than the input
     assertEquals(flds[0].getField(), "strdist(str(foo_s1),literal(junk), dist=org.apache.lucene.search.spell.JaroWinklerDistance)");
 

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestDocSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestDocSet.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestDocSet.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestDocSet.java Fri Jun 24 23:07:10 2011
@@ -35,7 +35,7 @@ import org.apache.lucene.search.DocIdSet
 import org.apache.lucene.search.DocIdSetIterator;
 
 /**
- * @version $Id$
+ *
  */
 public class TestDocSet extends LuceneTestCase {
   Random rand = random;

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestFastLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestFastLRUCache.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestFastLRUCache.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestFastLRUCache.java Fri Jun 24 23:07:10 2011
@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.Atomi
 /**
  * Test for FastLRUCache
  *
- * @version $Id$
+ *
  * @see org.apache.solr.search.FastLRUCache
  * @since solr 1.4
  */

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryTypes.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryTypes.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryTypes.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryTypes.java Fri Jun 24 23:07:10 2011
@@ -119,7 +119,29 @@ public class TestQueryTypes extends Abst
       assertQ(req( "q", "{!frange v="+f+" l='"+v+"' u='"+v+"'}" )
               ,"//result[@numFound='1']"
               );
-      
+
+      // exists()
+      assertQ(req( "fq","id:999", "q", "{!frange l=1 u=1}if(exists("+f+"),1,0)" )
+              ,"//result[@numFound='1']"
+              );
+
+      // boolean value of non-zero values (just leave off the exists from the prev test)
+      assertQ(req( "fq","id:999", "q", "{!frange l=1 u=1}if("+f+",1,0)" )
+              ,"//result[@numFound='1']"
+              );
+
+      if (!"id".equals(f)) {
+        assertQ(req( "fq","id:1", "q", "{!frange l=1 u=1}if(exists("+f+"),1,0)" )
+            ,"//result[@numFound='0']"
+        );
+
+       // boolean value of zero/missing values (just leave off the exists from the prev test)
+       assertQ(req( "fq","id:1", "q", "{!frange l=1 u=1}if("+f+",1,0)" )
+            ,"//result[@numFound='0']"
+        );
+
+      }
+
       // function query... just make sure it doesn't throw an exception
       if ("v_s".equals(f)) continue;  // in this context, functions must be able to be interpreted as a float
       assertQ(req( "q", "+id:999 _val_:\"" + f + "\"")

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryUtils.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryUtils.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestQueryUtils.java Fri Jun 24 23:07:10 2011
@@ -27,7 +27,7 @@ import org.apache.solr.util.AbstractSolr
 import java.util.List;
 
 /**
- * @version $Id$
+ *
  */
 public class TestQueryUtils extends AbstractSolrTestCase {
 

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSearchPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSearchPerf.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSearchPerf.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSearchPerf.java Fri Jun 24 23:07:10 2011
@@ -31,7 +31,7 @@ import java.util.*;
 import java.io.IOException;
 
 /**
- * @version $Id$
+ *
  */
 public class TestSearchPerf extends AbstractSolrTestCase {
 

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java Fri Jun 24 23:07:10 2011
@@ -65,10 +65,10 @@ public class TestSolrQueryParser extends
     assertTrue( rf.wantsAllFields() );
     assertNull( rf.getTransformer() );
     
-    rf = new ReturnFields( req("fl", "_explain_") );
+    rf = new ReturnFields( req("fl", "[explain]") );
     assertFalse( rf.wantsScore() );
     assertFalse( rf.wantsField( "id" ) );
-    assertEquals( "_explain_", rf.getTransformer().getName() );
+    assertEquals( "[explain]", rf.getTransformer().getName() );
 
     // Check that we want wildcards
     rf = new ReturnFields( req("fl", "id,aaa*,*bbb") );

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSort.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSort.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/TestSort.java Fri Jun 24 23:07:10 2011
@@ -126,13 +126,13 @@ public class TestSort extends AbstractSo
         final boolean sortMissingFirst2 = !luceneSort2 && !sortMissingLast2;
         final boolean reverse2 = r.nextBoolean();
 
-        if (r.nextBoolean()) sfields.add( new SortField(null, SortField.SCORE));
+        if (r.nextBoolean()) sfields.add( new SortField(null, SortField.Type.SCORE));
         // hit both use-cases of sort-missing-last
         sfields.add( Sorting.getStringSortField("f", reverse, sortMissingLast, sortMissingFirst) );
         if (secondary) {
           sfields.add( Sorting.getStringSortField("f2", reverse2, sortMissingLast2, sortMissingFirst2) );
         }
-        if (r.nextBoolean()) sfields.add( new SortField(null, SortField.SCORE));
+        if (r.nextBoolean()) sfields.add( new SortField(null, SortField.Type.SCORE));
 
         Sort sort = new Sort(sfields.toArray(new SortField[sfields.size()]));
 

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java Fri Jun 24 23:07:10 2011
@@ -289,7 +289,17 @@ public class TestFunctionQuery extends S
     assertQ(req("fl","*,score","q", "{!func}docfreq('a_t','cow')", "fq","id:6"), "//float[@name='score']='3.0'");
     assertQ(req("fl","*,score","q", "{!func}docfreq($field,$value)", "fq","id:6", "field","a_t", "value","cow"), "//float[@name='score']='3.0'");
     assertQ(req("fl","*,score","q", "{!func}termfreq(a_t,cow)", "fq","id:6"), "//float[@name='score']='5.0'");
+
     Similarity similarity = new DefaultSimilarity();
+
+    // make sure it doesn't get a NPE if no terms are present in a field.
+    assertQ(req("fl","*,score","q", "{!func}termfreq(nofield_t,cow)", "fq","id:6"), "//float[@name='score']='0.0'");
+    assertQ(req("fl","*,score","q", "{!func}docfreq(nofield_t,cow)", "fq","id:6"), "//float[@name='score']='0.0'");
+    assertQ(req("fl","*,score","q", "{!func}idf(nofield_t,cow)", "fq","id:6"),
+        "//float[@name='score']='" + similarity.idf(0,6)  + "'");
+     assertQ(req("fl","*,score","q", "{!func}tf(nofield_t,cow)", "fq","id:6"),
+        "//float[@name='score']='" + similarity.tf(0)  + "'");
+
     assertQ(req("fl","*,score","q", "{!func}idf(a_t,cow)", "fq","id:6"),
         "//float[@name='score']='" + similarity.idf(3,6)  + "'");
     assertQ(req("fl","*,score","q", "{!func}tf(a_t,cow)", "fq","id:6"),
@@ -581,4 +591,56 @@ public class TestFunctionQuery extends S
     purgeFieldCache(FieldCache.DEFAULT);   // avoid FC insanity    
   }
 
+    @Test
+  public void testBooleanFunctions() throws Exception {
+    assertU(adoc("id", "1", "text", "hello", "foo_s","A", "foo_ti", "0", "foo_tl","0"));
+    assertU(adoc("id", "2"                              , "foo_ti","10", "foo_tl","11"));
+    assertU(commit());
+
+    // true and false functions and constants
+    assertJQ(req("q", "id:1", "fl", "t:true(),f:false(),tt:{!func}true,ff:{!func}false")
+        , "/response/docs/[0]=={'t':true,'f':false,'tt':true,'ff':false}");
+
+    // test that exists(query) depends on the query matching the document
+    assertJQ(req("q", "id:1", "fl", "t:exists(query($q1)),f:exists(query($q2))", "q1","text:hello", "q2","text:there")
+        , "/response/docs/[0]=={'t':true,'f':false}");
+
+    // test if()
+    assertJQ(req("q", "id:1", "fl", "a1:if(true,'A','B')", "fl","b1:if(false,'A','B')")
+        , "/response/docs/[0]=={'a1':'A', 'b1':'B'}");
+
+    // test boolean operators
+    assertJQ(req("q", "id:1", "fl", "t1:and(true,true)", "fl","f1:and(true,false)", "fl","f2:and(false,true)", "fl","f3:and(false,false)")
+        , "/response/docs/[0]=={'t1':true, 'f1':false, 'f2':false, 'f3':false}");
+    assertJQ(req("q", "id:1", "fl", "t1:or(true,true)", "fl","t2:or(true,false)", "fl","t3:or(false,true)", "fl","f1:or(false,false)")
+        , "/response/docs/[0]=={'t1':true, 't2':true, 't3':true, 'f1':false}");
+    assertJQ(req("q", "id:1", "fl", "f1:xor(true,true)", "fl","t1:xor(true,false)", "fl","t2:xor(false,true)", "fl","f2:xor(false,false)")
+        , "/response/docs/[0]=={'t1':true, 't2':true, 'f1':false, 'f2':false}");
+    assertJQ(req("q", "id:1", "fl", "t:not(false),f:not(true)")
+        , "/response/docs/[0]=={'t':true, 'f':false}");
+
+
+    // def(), the default function that returns the first value that exists
+    assertJQ(req("q", "id:1", "fl", "x:def(id,123.0), y:def(foo_f,234.0)")
+        , "/response/docs/[0]=={'x':1.0, 'y':234.0}");
+    assertJQ(req("q", "id:1", "fl", "x:def(foo_s,'Q'), y:def(missing_s,'W')")
+        , "/response/docs/[0]=={'x':'A', 'y':'W'}");
+
+    // test constant conversion to boolean
+    assertJQ(req("q", "id:1", "fl", "a:not(0), b:not(1), c:not(0.0), d:not(1.1), e:not('A')")
+        , "/response/docs/[0]=={'a':true, 'b':false, 'c':true, 'd':false, 'e':false}");
+
+  }
+
+
+  @Test
+  public void testPseudoFieldFunctions() throws Exception {
+    assertU(adoc("id", "1", "text", "hello", "foo_s","A"));
+    assertU(adoc("id", "2"));
+    assertU(commit());
+
+    assertJQ(req("q", "id:1", "fl", "a:1,b:2.0,c:'X',d:{!func}foo_s,e:{!func}bar_s")  // if exists() is false, no pseudo-field should be added
+        , "/response/docs/[0]=={'a':1, 'b':2.0,'c':'X','d':'A'}");
+  }
+
 }

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/DirectSolrSpellCheckerTest.java Fri Jun 24 23:07:10 2011
@@ -22,10 +22,14 @@ import java.util.Map;
 
 import org.apache.lucene.analysis.Token;
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrCore;
+import org.apache.solr.handler.component.SpellCheckComponent;
+import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.util.RefCounted;
+import org.apache.solr.util.TestHarness;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -38,12 +42,13 @@ public class DirectSolrSpellCheckerTest 
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("solrconfig.xml","schema.xml");
+    initCore("solrconfig-spellcheckcomponent.xml","schema.xml");
     //Index something with a title
     assertNull(h.validateUpdate(adoc("id", "0", "teststop", "This is a title")));
     assertNull(h.validateUpdate(adoc("id", "1", "teststop", "The quick reb fox jumped over the lazy brown dogs.")));
     assertNull(h.validateUpdate(adoc("id", "2", "teststop", "This is a Solr")));
     assertNull(h.validateUpdate(adoc("id", "3", "teststop", "solr foo")));
+    assertNull(h.validateUpdate(adoc("id", "4", "teststop", "another foo")));
     assertNull(h.validateUpdate(commit()));
     queryConverter = new SimpleQueryConverter();
     queryConverter.init(new NamedList());
@@ -55,7 +60,7 @@ public class DirectSolrSpellCheckerTest 
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", DirectSolrSpellChecker.class.getName());
     spellchecker.add(DirectSolrSpellChecker.FIELD, "teststop");
-    spellchecker.add(DirectSolrSpellChecker.MINQUERYLENGTH, "2"); // we will try "fob"
+    spellchecker.add(DirectSolrSpellChecker.MINQUERYLENGTH, 2); // we will try "fob"
 
     SolrCore core = h.getCore();
     checker.init(spellchecker, core);
@@ -77,4 +82,15 @@ public class DirectSolrSpellCheckerTest 
     assertTrue("suggestions is not null and it should be", suggestions == null);
     searcher.decref();
   }
+  
+  @Test
+  public void testOnlyMorePopularWithExtendedResults() throws Exception {
+  	assertQ(req("q", "teststop:fox", "qt", "spellCheckCompRH", SpellCheckComponent.COMPONENT_NAME, "true", SpellCheckComponent.SPELLCHECK_DICT, "direct", SpellCheckComponent.SPELLCHECK_EXTENDED_RESULTS, "true", SpellCheckComponent.SPELLCHECK_ONLY_MORE_POPULAR, "true"),
+        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/int[@name='origFreq']=1",
+        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/arr[@name='suggestion']/lst/str[@name='word']='foo'",
+        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='fox']/arr[@name='suggestion']/lst/int[@name='freq']=2",
+        "//lst[@name='spellcheck']/lst[@name='suggestions']/bool[@name='correctlySpelled']='true'"
+  	);
+  }  
+  
 }

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java Fri Jun 24 23:07:10 2011
@@ -22,6 +22,7 @@ import java.util.Set;
 
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.params.CommonParams;
+import org.apache.solr.common.params.GroupParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
@@ -60,8 +61,8 @@ public class SpellCheckCollatorTest exte
 		params.add(SpellCheckComponent.SPELLCHECK_BUILD, "true");
 		params.add(SpellCheckComponent.SPELLCHECK_COUNT, "10");		
 		params.add(SpellCheckComponent.SPELLCHECK_COLLATE, "true");
-		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "5");
-		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "2");
+		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "10");
+		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "10");
 		params.add(CommonParams.Q, "lowerfilt:(+fauth +home +loane)");
 		params.add(CommonParams.FQ, "NOT(id:1)");
 		
@@ -77,8 +78,10 @@ public class SpellCheckCollatorTest exte
 		NamedList spellCheck = (NamedList) values.get("spellcheck");
 		NamedList suggestions = (NamedList) spellCheck.get("suggestions");
 		List<String> collations = suggestions.getAll("collation");
-		assertTrue(collations.size() == 1);
-		assertTrue(collations.get(0).equals("lowerfilt:(+faith +hope +love)"));		
+		assertTrue(collations.size() > 0);
+		for(String collation : collations) {
+			assertTrue(!collation.equals("lowerfilt:(+faith +hope +loaves)"));	
+		}
 	}
 	
 	@Test
@@ -180,7 +183,7 @@ public class SpellCheckCollatorTest exte
 		// combination exists.
 		params.remove(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES);
 		params.remove(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS);
-		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "5");
+		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "10");
 		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "2");
 		handler = core.getRequestHandler("spellCheckCompRH");
 		rsp = new SolrQueryResponse();
@@ -234,4 +237,37 @@ public class SpellCheckCollatorTest exte
 			assertTrue(correctionForLoane.equals("love") || correctionForLoane.equals("loaves"));
 		}
 	}
+	
+	@Test
+	public void testCollateWithGrouping() throws Exception
+	{
+		SolrCore core = h.getCore();
+		SearchComponent speller = core.getSearchComponent("spellcheck");
+		assertTrue("speller is null and it shouldn't be", speller != null);
+		
+		ModifiableSolrParams params = new ModifiableSolrParams();		
+		params.add(SpellCheckComponent.COMPONENT_NAME, "true");
+		params.add(SpellCheckComponent.SPELLCHECK_BUILD, "true");
+		params.add(SpellCheckComponent.SPELLCHECK_COUNT, "10");		
+		params.add(SpellCheckComponent.SPELLCHECK_COLLATE, "true");
+		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATION_TRIES, "5");
+		params.add(SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "1");
+		params.add(CommonParams.Q, "lowerfilt:(+fauth)");
+		params.add(GroupParams.GROUP, "true");
+		params.add(GroupParams.GROUP_FIELD, "id");
+		
+		//Because a FilterQuery is applied which removes doc id#1 from possible hits, we would
+		//not want the collations to return us "lowerfilt:(+faith +hope +loaves)" as this only matches doc id#1.
+		SolrRequestHandler handler = core.getRequestHandler("spellCheckCompRH");
+		SolrQueryResponse rsp = new SolrQueryResponse();
+		rsp.add("responseHeader", new SimpleOrderedMap());
+		SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
+		handler.handleRequest(req, rsp);
+		req.close();
+		NamedList values = rsp.getValues();
+		NamedList spellCheck = (NamedList) values.get("spellcheck");
+		NamedList suggestions = (NamedList) spellCheck.get("suggestions");
+		List<String> collations = suggestions.getAll("collation");
+		assertTrue(collations.size() == 1);
+	}
 }

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java Fri Jun 24 23:07:10 2011
@@ -28,6 +28,7 @@ import org.junit.Test;
 public class SpellPossibilityIteratorTest extends SolrTestCaseJ4 {
 
 	private static Map<Token, LinkedHashMap<String, Integer>> suggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>();
+	private static Map<Token, LinkedHashMap<String, Integer>> lotsaSuggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>();
 
 	@Override
   @Before
@@ -72,21 +73,57 @@ public class SpellPossibilityIteratorTes
 		suggestions.put(new Token("AYE", 0, 2), AYE);
 		suggestions.put(new Token("BEE", 0, 2), BEE);
 		suggestions.put(new Token("CEE", 0, 2), CEE);
+		
+		lotsaSuggestions.put(new Token("AYE", 0, 2), AYE);
+		lotsaSuggestions.put(new Token("BEE", 0, 2), BEE);
+		lotsaSuggestions.put(new Token("CEE", 0, 2), CEE);
+		
+		lotsaSuggestions.put(new Token("AYE1", 0, 3), AYE);
+		lotsaSuggestions.put(new Token("BEE1", 0, 3), BEE);
+		lotsaSuggestions.put(new Token("CEE1", 0, 3), CEE);
+		
+		lotsaSuggestions.put(new Token("AYE2", 0, 3), AYE);
+		lotsaSuggestions.put(new Token("BEE2", 0, 3), BEE);
+		lotsaSuggestions.put(new Token("CEE2", 0, 3), CEE);
+		
+		lotsaSuggestions.put(new Token("AYE3", 0, 3), AYE);
+		lotsaSuggestions.put(new Token("BEE3", 0, 3), BEE);
+		lotsaSuggestions.put(new Token("CEE3", 0, 3), CEE);
+		
+		lotsaSuggestions.put(new Token("AYE4", 0, 3), AYE);
+		lotsaSuggestions.put(new Token("BEE4", 0, 3), BEE);
+		lotsaSuggestions.put(new Token("CEE4", 0, 3), CEE);
+	}
+	
+	@Test
+	public void testScalability() throws Exception {
+		PossibilityIterator iter = new PossibilityIterator(lotsaSuggestions, 1000, 10000);
+		int count = 0;
+		while (iter.hasNext()) {			
+			RankedSpellPossibility rsp = iter.next();
+			count++;
+		}
+		assertTrue(count==1000);
 	}
 	
 	@Test
 	public void testSpellPossibilityIterator() throws Exception {
-		PossibilityIterator iter = new PossibilityIterator(suggestions);
+		PossibilityIterator iter = new PossibilityIterator(suggestions, 1000, 10000);
 		int count = 0;
 		while (iter.hasNext()) {
 			
-			iter.next();
+			RankedSpellPossibility rsp = iter.next();
+			if(count==0) {
+				assertTrue("I".equals(rsp.getCorrections().get(0).getCorrection()));
+				assertTrue("alpha".equals(rsp.getCorrections().get(1).getCorrection()));
+				assertTrue("one".equals(rsp.getCorrections().get(2).getCorrection()));
+			}
 			count++;
 		}
 		assertTrue(("Three maps (8*9*10) should return 720 iterations but instead returned " + count), count == 720);
 
 		suggestions.remove(new Token("CEE", 0, 2));
-		iter = new PossibilityIterator(suggestions);
+		iter = new PossibilityIterator(suggestions, 100, 10000);
 		count = 0;
 		while (iter.hasNext()) {
 			iter.next();
@@ -95,16 +132,16 @@ public class SpellPossibilityIteratorTes
 		assertTrue(("Two maps (8*9) should return 72 iterations but instead returned " + count), count == 72);
 
 		suggestions.remove(new Token("BEE", 0, 2));
-		iter = new PossibilityIterator(suggestions);
+		iter = new PossibilityIterator(suggestions, 5, 10000);
 		count = 0;
 		while (iter.hasNext()) {
 			iter.next();
 			count++;
 		}
-		assertTrue(("One map of 8 should return 8 iterations but instead returned " + count), count == 8);
+		assertTrue(("We requested 5 suggestions but got " + count), count == 5);
 
 		suggestions.remove(new Token("AYE", 0, 2));
-		iter = new PossibilityIterator(suggestions);
+		iter = new PossibilityIterator(suggestions, Integer.MAX_VALUE, 10000);
 		count = 0;
 		while (iter.hasNext()) {
 			iter.next();

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/spelling/SpellingQueryConverterTest.java Fri Jun 24 23:07:10 2011
@@ -29,7 +29,7 @@ import java.util.Collection;
 /**
  * Test for SpellingQueryConverter
  *
- * @version $Id$
+ *
  * @since solr 1.3
  */
 public class SpellingQueryConverterTest extends LuceneTestCase {

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/BitSetPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/BitSetPerf.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/BitSetPerf.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/BitSetPerf.java Fri Jun 24 23:07:10 2011
@@ -28,7 +28,7 @@ import org.apache.lucene.util.OpenBitSet
  * is at least 10 seconds for better accuracy.  Close browsers on your system (javascript
  * or flash may be running and cause more erratic results).
  *
- * @version $Id$
+ *
  */
 public class BitSetPerf {
   static Random rand = new Random(0);

Modified: lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/TestUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/TestUtils.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/TestUtils.java (original)
+++ lucene/dev/branches/solr2193/solr/src/test/org/apache/solr/util/TestUtils.java Fri Jun 24 23:07:10 2011
@@ -28,7 +28,7 @@ import org.apache.solr.common.util.StrUt
 import org.junit.Assert;
 
 /**
- * @version $Id$
+ *
  */
 public class TestUtils extends LuceneTestCase {
   public void testSplitEscaping() {

Modified: lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java Fri Jun 24 23:07:10 2011
@@ -56,7 +56,7 @@ import org.apache.solr.servlet.SolrReque
  * TODO -- this implementation sends the response to XML and then parses it.  
  * It *should* be able to convert the response directly into a named list.
  * 
- * @version $Id$
+ *
  * @since solr 1.3
  */
 public class EmbeddedSolrServer extends SolrServer

Modified: lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java Fri Jun 24 23:07:10 2011
@@ -172,7 +172,7 @@ public class JettySolrRunner {
    */
   public static void main(String[] args) {
     try {
-      JettySolrRunner jetty = new JettySolrRunner("/solr", 3456);
+      JettySolrRunner jetty = new JettySolrRunner("/solr", 8983);
       jetty.start();
     } catch (Exception ex) {
       ex.printStackTrace();

Modified: lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java Fri Jun 24 23:07:10 2011
@@ -48,7 +48,7 @@ import org.apache.solr.schema.IndexSchem
  * This class is designed to be as simple as possible and allow for more flexibility
  * in how you interface to Solr.
  * 
- * @version $Id$
+ *
  * @since solr 1.2
  */
 public class DirectSolrConnection 

Modified: lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java Fri Jun 24 23:07:10 2011
@@ -32,7 +32,7 @@ import java.util.logging.Logger;
 /**
  * Admin JDK Logger level report and selection servlet.
  *
- * @version $Id$
+ *
  * @since solr 1.3
  */
 public final class LogLevelSelection extends HttpServlet {

Modified: lucene/dev/branches/solr2193/solr/src/webapp/web/css/screen.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/web/css/screen.css?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/web/css/screen.css (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/web/css/screen.css Fri Jun 24 23:07:10 2011
@@ -13,7 +13,7 @@ body, h1, h2, h3, h4, h5, h6, a, button,
 
 body
 {
-    padding: 20px;
+    padding: 30px;
     text-align: center;
 }
 
@@ -62,7 +62,6 @@ ul
     margin: 0 auto;
     margin-bottom: 30px;
     text-align: left;
-    width: 1002px;
 }
 
 #header
@@ -109,11 +108,9 @@ ul
 
 #main
 {
-    background-image: url( ../img/div.gif );
-    background-position: 200px 0;
-    background-repeat: repeat-y;
     border: 1px solid #c0c0c0;
     min-height: 600px;
+    min-width:750px;
     position: relative;
 }
 
@@ -186,7 +183,7 @@ ul
 #menu-wrapper
 {
     float: left;
-    width: 201px;
+    width: 20%;
 }
 
 #menu p.loader
@@ -285,7 +282,11 @@ ul
 #menu li
 {
     border-bottom: 1px solid #c0c0c0;
-    /*border-right: 1px solid #f0f0f0;*/
+}
+
+#menu li p
+{
+    border-right: 1px solid #c0c0c0;
 }
 
 #menu li.optional
@@ -293,13 +294,16 @@ ul
     display: none;
 }
 
-#menu li:last-child
+#menu li.active:last-child
 {
     border-bottom: 0;
 }
 
 #menu ul ul
 {
+    background-image: url( ../img/div.gif );
+    background-position: 100% 0;
+    background-repeat: repeat-y;
     display: none;
     padding-top: 5px;
     padding-bottom: 10px;
@@ -310,6 +314,11 @@ ul
     display: block;
 }
 
+#menu ul li.active:last-child ul
+{
+    border-bottom: 1px solid #f0f0f0;
+}
+
 #menu ul ul li
 {
     border-bottom: 0;
@@ -394,7 +403,6 @@ ul
 #menu .config a { background-image: url( ../img/ico/gear.png ); }
 #menu .analysis a { background-image: url( ../img/ico/funnel.png ); }
 #menu .schema-browser a { background-image: url( ../img/ico/book-open-text.png ); }
-#menu .stats a { background-image: url( ../img/ico/chart.png ); }
 #menu .replication a { background-image: url( ../img/ico/node.png ); }
 #menu .distribution a { background-image: url( ../img/ico/node-select.png ); }
 #menu .ping a { background-image: url( ../img/ico/system-monitor.png ); }
@@ -402,10 +410,22 @@ ul
 #menu .plugins a { background-image: url( ../img/ico/block.png ); }
 #menu .dataimport a { background-image: url( ../img/ico/document-import.png ); }
 
+#menu .ping.error
+{
+    background-color: #f7f7e9;
+}
+
+#menu .ping.error a
+{
+    background-color: transparent;
+    background-image: url( ../img/ico/system-monitor--exclamation.png );
+    cursor: help;
+}
+
 #content-wrapper
 {
     float: right;
-    width: 799px;
+    width: 80%;
 }
 
 #content
@@ -413,9 +433,10 @@ ul
     padding: 10px;
 }
 
-#content.single
+#content > .loader
 {
-    padding: 0;
+    background-position: 0 50%;
+    padding-left: 21px;
 }
 
 #content iframe
@@ -426,6 +447,12 @@ ul
     width: 100%;
 }
 
+#content > pre
+{
+    max-height: 600px;
+    overflow: auto;
+}
+
 #content .block
 {
     margin-bottom: 10px;
@@ -458,10 +485,160 @@ ul
     display: none;
 }
 
+/* syntax */
+
+pre.syntax
+{
+    overflow: auto;
+}
+
+pre.syntax code
+{
+    display: block;
+    color: #000;
+}
+
+pre.syntax .comment,
+pre.syntax .template_comment,
+pre.syntax .diff .header,
+pre.syntax .javadoc
+{
+    color: #998;
+    font-style: italic;
+}
+
+pre.syntax .keyword,
+pre.syntax .css .rule .keyword,
+pre.syntax .winutils,
+pre.syntax .javascript .title,
+pre.syntax .lisp .title,
+pre.syntax .subst
+{
+    color: #000;
+    font-weight: bold;
+}
+
+pre.syntax .number,
+pre.syntax .hexcolor
+{
+    color: #40a070;
+}
+
+pre.syntax .string,
+pre.syntax .tag .value,
+pre.syntax .phpdoc,
+pre.syntax .tex .formula
+{
+    color: #d14;
+}
+
+pre.syntax .title,
+pre.syntax .id
+{
+    color: #900;
+    font-weight: bold;
+}
+
+pre.syntax .javascript .title,
+pre.syntax .lisp .title,
+pre.syntax .subst
+{
+    font-weight: normal;
+}
+
+pre.syntax .class .title,
+pre.syntax .tex .command
+{
+    color: #458;
+    font-weight: bold;
+}
+
+pre.syntax .tag,
+pre.syntax .css .keyword,
+pre.syntax .html .keyword,
+pre.syntax .tag .title,
+pre.syntax .django .tag .keyword
+{
+    color: #000080;
+    font-weight: normal;
+}
+
+pre.syntax .attribute,
+pre.syntax .variable,
+pre.syntax .instancevar,
+pre.syntax .lisp .body
+{
+    color: #008080;
+}
+
+pre.syntax .regexp
+{
+    color: #009926;
+}
+
+pre.syntax .class
+{
+    color: #458;
+    font-weight: bold;
+}
+
+pre.syntax .symbol,
+pre.syntax .ruby .symbol .string,
+pre.syntax .ruby .symbol .keyword,
+pre.syntax .ruby .symbol .keymethods,
+pre.syntax .lisp .keyword,
+pre.syntax .tex .special
+{
+    color: #990073;
+}
+
+pre.syntax .builtin,
+pre.syntax .built_in,
+pre.syntax .lisp .title
+{
+    color: #0086b3;
+}
+
+pre.syntax .preprocessor,
+pre.syntax .pi,
+pre.syntax .doctype,
+pre.syntax .shebang,
+pre.syntax .cdata
+{
+    color: #999;
+    font-weight: bold;
+}
+
+pre.syntax .deletion
+{
+    background: #fdd;
+}
+
+pre.syntax .addition
+{
+    background: #dfd;
+}
+
+pre.syntax .diff .change
+{
+    background: #0086b3;
+}
+
+pre.syntax .chunk
+{
+    color: #aaa;
+}
+
+pre.syntax .tex .formula
+{
+    opacity: 0.5;
+}
+
 /* dashboard */
 
 #content #dashboard .block
 {
+    background-image: none;
     width: 49%;
 }
 
@@ -550,85 +727,13 @@ ul
     display: block;
 }
 
-#content #dashboard #replication.is-master .slave
+#content #dashboard #replication #details table thead td span
 {
     display: none;
 }
 
-#content #dashboard #replication table
-{
-    border-collapse: collapse;
-}
-
-#content #dashboard #replication table th,
-#content #dashboard #replication table td
-{
-    border: 1px solid #f0f0f0;
-    padding: 2px 5px;
-}
-
-#content #dashboard #replication table thead td
-{
-    border: 0;
-}
-
-#content #dashboard #replication table thead th,
-#content #dashboard #replication table tbody td
-{
-    border-right: 0;
-}
-
-#content #dashboard #replication table thead th
-{
-    border-top: 0;
-    font-weight: bold;
-}
-
-#content #dashboard #replication table tbody th,
-#content #dashboard #replication table tbody td
-{
-    border-bottom: 0;
-    text-align: right;
-}
-
-#content #dashboard #replication table tbody th
-{
-    border-left: 0;
-}
-
-#content #dashboard #replication table tbody th,
-#content #dashboard #replication dt
-{
-    width: 100px;
-}
-
-#content #dashboard #replication dl
-{
-    display: none;
-    margin-top: 10px;
-}
-
-#content #dashboard #replication dt,
-#content #dashboard #replication dd
-{
-    display: block;
-    padding-top: 1px;
-    padding-bottom: 1px;
-}
-
-#content #dashboard #replication dt
-{
-    border-right: 1px solid #f0f0f0;
-    float: left;
-    padding-left: 5px;
-    padding-right: 5px;
-    margin-right: 3px;
-    text-align: right;
-}
-
 #content #dashboard #dataimport
 {
-    background-color: #0ff;
     float: right;
 }
 
@@ -711,6 +816,19 @@ ul
     max-width: 99%;
 }
 
+#content #analysis #analysis-error
+{
+    background-color: #f00;
+    background-image: url( ../img/ico/construction.png );
+    background-position: 10px 50%;
+    color: #fff;
+    display: none;
+    font-weight: bold;
+    margin-bottom: 20px;
+    padding: 10px;
+    padding-left: 35px;
+}
+
 #content #analysis .analysis-result h2
 {
     position: relative;
@@ -811,6 +929,11 @@ ul
     padding: 1px 2px;
 }
 
+#content #analysis .analysis-result .row table td div.empty
+{
+    color: #f0f0f0;
+}
+
 #content #analysis .analysis-result .row table td div.match
 {
     background-color: #e9eff7;
@@ -826,25 +949,62 @@ ul
 
 /* plugins */
 
-#content #plugins .loader
+#content #plugins #navigation
+{
+    background-image: url( ../img/div.gif );
+    background-position: 100% 0;
+    background-repeat: repeat-y;
+    width: 20%;
+}
+
+#content #plugins #navigation a
 {
     background-position: 0 50%;
+    border-right: 1px solid #f0f0f0;
+    display: block;
+    margin-left: 1px;
+    padding: 3px 0;
     padding-left: 21px;
 }
 
-#content #plugins .block h2 { background-image: url( ../img/ico/block-small.png ); }
-#content #plugins #core h2 { background-image: url( ../img/ico/terminal.png ); }
-#content #plugins #queryhandler h2 { background-image: url( ../img/ico/magnifier.png ); }
-#content #plugins #updatehandler h2 { background-image: url( ../img/ico/arrow-circle.png ); }
-#content #plugins #cache h2 { background-image: url( ../img/ico/disk-black.png ); }
-#content #plugins #highlighting h2 { background-image: url( ../img/ico/highlighter-text.png ); }
+#content #plugins #navigation .cache a { background-image: url( ../img/ico/disk-black.png ); }
+#content #plugins #navigation .core a { background-image: url( ../img/ico/toolbox.png ); }
+#content #plugins #navigation .other a { background-image: url( ../img/ico/zone.png ); }
+#content #plugins #navigation .highlighting a { background-image: url( ../img/ico/highlighter-text.png ); }
+#content #plugins #navigation .updatehandler a{ background-image: url( ../img/ico/arrow-circle.png ); }
+#content #plugins #navigation .queryhandler a { background-image: url( ../img/ico/magnifier.png ); }
 
-#content #plugins .block .entry
+#content #plugins #navigation a:hover
 {
-    padding-top: 10px;
+    background-color: #fafafa;
+}
+
+#content #plugins #navigation .current a
+{
+    background-color: #fff;
+    border-right-color: #fff;
+    border-top: 1px solid #f0f0f0;
+    border-bottom: 1px solid #f0f0f0;
+    font-weight: bold;
+}
+
+#content #plugins #frame
+{
+    float: right;
+    width: 78%;
+}
+
+#content #plugins #frame .entry
+{
+    margin-bottom: 10px;
+}
+
+#content #plugins #frame .entry:last-child
+{
+    margin-bottom: 0;
 }
 
-#content #plugins .block .entry a
+#content #plugins #frame .entry a
 {
     background-image: url( ../img/ico/chevron-small-expand.png );
     background-position: 0 50%;
@@ -853,67 +1013,67 @@ ul
     padding-left: 21px;
 }
 
-#content #plugins .block .entry.expanded a
+#content #plugins #frame .entry.expanded a
 {
     background-image: url( ../img/ico/chevron-small.png );
 }
 
-#content #plugins .block .entry.expanded ul
+#content #plugins #frame .entry.expanded ul
 {
     display: block;
 }
 
-#content #plugins .block .entry ul
+#content #plugins #frame .entry ul
 {
     display: none;
     padding-top: 5px;
     margin-left: 21px;
 }
 
-#content #plugins .block .entry li
+#content #plugins #frame .entry li
 {
     padding-top: 2px;
     padding-bottom: 2px;
 }
 
-#content #plugins .block .entry li.stats
+#content #plugins #frame .entry li.stats
 {
     border-top: 1px solid #c0c0c0;
     margin-top: 5px;
     padding-top: 5px;
 }
 
-#content #plugins .block .entry li.odd
+#content #plugins #frame .entry li.odd
 {
     background-color: #f8f8f8;
 }
 
-#content #plugins .block .entry dt,
-#content #plugins .block .entry .stats span
+#content #plugins #frame .entry dt,
+#content #plugins #frame .entry .stats span
 {
     float: left;
     width: 11%;
 }
 
-#content #plugins .block .entry dd,
-#content #plugins .block .entry .stats ul
+#content #plugins #frame .entry dd,
+#content #plugins #frame .entry .stats ul
 {
     float: right;
     width: 88%;
 }
 
-#content #plugins .block .entry .stats ul
+#content #plugins #frame .entry .stats ul
 {
     margin: 0;
     padding: 0;
 }
 
-#content #plugins .block .entry .stats dt
+#content #plugins #frame .entry .stats dt
 {
     width: 27%;
 }
 
-#content #plugins .block .entry .stats dd
+#content #plugins #frame .entry .stats dd
 {
     width: 72%;
 }
@@ -923,14 +1083,14 @@ ul
 #content #query
 {
     background-image: url( ../img/div.gif );
-    background-position: 210px 0;
+    background-position: 22% 0;
     background-repeat: repeat-y;
 }
 
 #content #query #form
 {
     float: left;
-    width: 200px;
+    width: 21%;
 }
 
 #content #query #form label
@@ -1018,7 +1178,7 @@ ul
 {
     display: none;
     float: right;
-    width: 560px;
+    width: 77%;
 }
 
 #content #query #result #url
@@ -1334,6 +1494,12 @@ ul
     padding-left: 10px;
 }
 
+#content #schema-browser #related #f-df-t
+{
+    border-bottom: 1px solid #f0f0f0;
+    padding-bottom: 15px;
+}
+
 #content #schema-browser #related dl
 {
     margin-top: 15px;
@@ -1367,7 +1533,9 @@ ul
 #content #schema-browser #related .dynamic-field .dynamic-field,
 #content #schema-browser #related .dynamic-field .dynamic-field a,
 #content #schema-browser #related .type .type,
-#content #schema-browser #related .type .type a
+#content #schema-browser #related .type .type a,
+#content #schema-browser #related .active,
+#content #schema-browser #related .active a
 {
     color: #333;
 }
@@ -1378,6 +1546,11 @@ ul
     color: #666;
 }
 
+#content #schema-browser #data
+{
+    display: none;
+}
+
 #content #schema-browser #data #index dt
 {
     display: none;
@@ -1491,6 +1664,7 @@ ul
 
 #content #schema-browser #data #field .topterms-holder
 {
+    display: none;
     float: left;
 }
 
@@ -1973,6 +2147,29 @@ ul
     display: none;
 }
 
+#content #threads .controls
+{
+    padding-top: 5px;
+    padding-bottom: 5px;
+}
+
+#content #threads .controls a
+{
+    background-image: url( ../img/ico/chevron-small-expand.png );
+    padding-left: 21px;
+}
+
+#content #threads.expanded .controls a
+{
+    background-image: url( ../img/ico/chevron-small.png );
+}
+
+#content #threads.expanded .controls .expand,
+#content #threads.collapsed .controls .collapse
+{
+    display: none;
+}
+
 /* dataimport */
 
 #content #dataimport
@@ -2212,22 +2409,27 @@ ul
 
 #content #cores
 {
-    background-image: url( ../img/div.gif );
-    background-position: 150px 0;
-    background-repeat: repeat-y;
 }
 
 #content #cores #frame
 {
     float: right;
-    width: 610px;
+    width: 78%;
+}
+
+#content #cores #navigation
+{
+    background-image: url( ../img/div.gif );
+    background-position: 100% 0;
+    background-repeat: repeat-y;
+    width: 20%;
 }
 
 #content #cores #list
 {
     float: left;
     padding-top: 15px;
-    width: 151px;
+    width: 100%;
 }
 
 #content #cores #list a
@@ -2483,20 +2685,20 @@ ul
 #content #replication
 {
     background-image: url( ../img/div.gif );
-    background-position: 165px 0;
+    background-position: 21% 0;
     background-repeat: repeat-y;
 }
 
 #content #replication #frame
 {
     float: right;
-    width: 600px;
+    width: 78%;
 }
 
 #content #replication #navigation
 {
     float: left;
-    width: 161px;
+    width: 20%;
 }
 
 #content #replication #error
@@ -2830,6 +3032,7 @@ ul
 #content #replication #details table tbody .size
 {
     text-align: right;
+    white-space: nowrap;
 }
 
 #content #replication #details table tbody .generation div

Modified: lucene/dev/branches/solr2193/solr/src/webapp/web/index.jsp
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2193/solr/src/webapp/web/index.jsp?rev=1139458&r1=1139457&r2=1139458&view=diff
==============================================================================
--- lucene/dev/branches/solr2193/solr/src/webapp/web/index.jsp (original)
+++ lucene/dev/branches/solr2193/solr/src/webapp/web/index.jsp Fri Jun 24 23:07:10 2011
@@ -21,6 +21,8 @@
     app_config.solr_path = '<%= request.getContextPath() %>';
     app_config.core_admin_path = '<%= cores.getAdminPath() %>';
     app_config.zookeeper_path = 'zookeeper.jsp';
+    app_config.schema_path = '/admin/file?file=schema.xml&contentType=text/xml;charset=utf-8';
+    app_config.config_path = '/admin/file?file=solrconfig.xml&contentType=text/xml;charset=utf-8';
     
     </script>
     
@@ -35,14 +37,14 @@
 
             <div id="wip-notice">
                 <p>This interface is work in progress. It works best in Chrome.</p>
-                <p><a href="admin/">Use the <span>old admin interface</span> if there are problems with this one.</a></p>
+                <p><a href="admin">Use the <span>old admin interface</span> if there are problems with this one.</a></p>
                 <p><a href="https://issues.apache.org/jira/browse/SOLR-2399">Bugs/Requests/Suggestions: <span>SOLR-2399</span></a></p>
             </div>
 
-	    <p id="environment">&nbsp;</p>
+            <p id="environment">&nbsp;</p>
 
         </div>
-        
+
         <div id="main" class="clearfix">
         
             <div id="content-wrapper">