You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/06/06 05:58:39 UTC

svn commit: r1132518 [3/3] - in /lucene/dev/branches/solr2452: ./ dev-tools/maven/ lucene/ lucene/src/test-framework/org/apache/lucene/analysis/ lucene/src/test-framework/org/apache/lucene/index/ lucene/src/test-framework/org/apache/lucene/util/ lucene...

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java Mon Jun  6 03:58:37 2011
@@ -24,6 +24,8 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 import java.text.DecimalFormat;
 import java.util.Random;
@@ -32,14 +34,12 @@ import java.util.Random;
  */
 public class TestBooleanMinShouldMatch extends LuceneTestCase {
 
-    private Directory index;
-    private IndexReader r;
-    private IndexSearcher s;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
+    private static Directory index;
+    private static IndexReader r;
+    private static IndexSearcher s;
 
+    @BeforeClass
+    public static void beforeClass() throws Exception {
         String[] data = new String [] {
             "A 1 2 3 4 5 6",
             "Z       4 5 6",
@@ -70,12 +70,14 @@ public class TestBooleanMinShouldMatch e
 //System.out.println("Set up " + getName());
     }
     
-    @Override
-    public void tearDown() throws Exception {
+    @AfterClass
+    public static void afterClass() throws Exception {
       s.close();
+      s = null;
       r.close();
+      r = null;
       index.close();
-      super.tearDown();
+      index = null;
     }
 
 
@@ -312,7 +314,7 @@ public class TestBooleanMinShouldMatch e
 
 
       // increase number of iterations for more complete testing      
-      int num = 50 * RANDOM_MULTIPLIER;
+      int num = (TEST_NIGHTLY ? 50 : 10) * RANDOM_MULTIPLIER;
       for (int i=0; i<num; i++) {
         int lev = random.nextInt(maxLev);
         final long seed = random.nextLong();

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java Mon Jun  6 03:58:37 2011
@@ -46,7 +46,7 @@ public class TestMultiValuedNumericRange
     
     DecimalFormat format = new DecimalFormat("00000000000", new DecimalFormatSymbols(Locale.US));
     
-    int num = 5000 * RANDOM_MULTIPLIER;
+    int num = (TEST_NIGHTLY ? 5000 : 500) * RANDOM_MULTIPLIER;
     for (int l = 0; l < num; l++) {
       Document doc = new Document();
       for (int m=0, c=random.nextInt(10); m<=c; m++) {

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java Mon Jun  6 03:58:37 2011
@@ -44,7 +44,7 @@ public class TestNumericRangeQuery32 ext
   // shift the starting of the values to the left, to also have negative values:
   private static final int startOffset = - 1 << 15;
   // number of docs to generate for testing
-  private static final int noDocs = 10000 * RANDOM_MULTIPLIER;
+  private static final int noDocs = (TEST_NIGHTLY ? 10000 : 5000) * RANDOM_MULTIPLIER;
   
   private static Directory directory = null;
   private static IndexReader reader = null;

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java Mon Jun  6 03:58:37 2011
@@ -41,7 +41,7 @@ public class TestNumericRangeQuery64 ext
   // shift the starting of the values to the left, to also have negative values:
   private static final long startOffset = - 1L << 31;
   // number of docs to generate for testing
-  private static final int noDocs = 10000 * RANDOM_MULTIPLIER;
+  private static final int noDocs = (TEST_NIGHTLY ? 10000 : 5000) * RANDOM_MULTIPLIER;
   
   private static Directory directory = null;
   private static IndexReader reader = null;

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java Mon Jun  6 03:58:37 2011
@@ -24,6 +24,8 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 /**
  * https://issues.apache.org/jira/browse/LUCENE-1974
@@ -38,53 +40,48 @@ import org.apache.lucene.store.Directory
 public class TestPrefixInBooleanQuery extends LuceneTestCase {
 
   private static final String FIELD = "name";
-  private Directory directory;
-  private IndexReader reader;
-  private IndexSearcher searcher;
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  private static Directory directory;
+  private static IndexReader reader;
+  private static IndexSearcher searcher;
+
+  @BeforeClass
+  public static void beforeClass() throws Exception {
     directory = newDirectory();
     RandomIndexWriter writer = new RandomIndexWriter(random, directory);
 
+    Document doc = new Document();
+    Field field = newField(FIELD, "meaninglessnames", Field.Store.NO,
+        Field.Index.NOT_ANALYZED_NO_NORMS);
+    doc.add(field);
+    
     for (int i = 0; i < 5137; ++i) {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "meaninglessnames", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
-      writer.addDocument(doc);
-    }
-    { 
-      Document doc = new Document();
-      doc.add(newField(FIELD, "tangfulin", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
       writer.addDocument(doc);
     }
+    
+    field.setValue("tangfulin");
+    writer.addDocument(doc);
 
+    field.setValue("meaninglessnames");
     for (int i = 5138; i < 11377; ++i) {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "meaninglessnames", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
-      writer.addDocument(doc);
-    }
-    {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "tangfulin", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
       writer.addDocument(doc);
     }
     
+    field.setValue("tangfulin");
+    writer.addDocument(doc);
+    
     reader = writer.getReader();
     searcher = newSearcher(reader);
     writer.close();
   }
   
-  @Override
-  public void tearDown() throws Exception {
+  @AfterClass
+  public static void afterClass() throws Exception {
     searcher.close();
+    searcher = null;
     reader.close();
+    reader = null;
     directory.close();
-    super.tearDown();
+    directory = null;
   }
   
   public void testPrefixQuery() throws Exception {

Modified: lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/util/TestArrayUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/util/TestArrayUtil.java?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/util/TestArrayUtil.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/util/TestArrayUtil.java Mon Jun  6 03:58:37 2011
@@ -126,7 +126,8 @@ public class TestArrayUtil extends Lucen
   }
   
   public void testQuickSort() {
-    for (int i = 0, c = 500 * RANDOM_MULTIPLIER; i < c; i++) {
+    int num = (TEST_NIGHTLY ? 500 : 50) * RANDOM_MULTIPLIER;
+    for (int i = 0; i < num; i++) {
       Integer[] a1 = createRandomArray(1000), a2 = a1.clone();
       ArrayUtil.quickSort(a1);
       Arrays.sort(a2);
@@ -154,7 +155,8 @@ public class TestArrayUtil extends Lucen
   
   // This is a test for LUCENE-3054 (which fails without the merge sort fall back with stack overflow in most cases)
   public void testQuickToMergeSortFallback() {
-    for (int i = 0, c = 500 * RANDOM_MULTIPLIER; i < c; i++) {
+    int num = (TEST_NIGHTLY ? 500 : 50) * RANDOM_MULTIPLIER;
+    for (int i = 0; i < num; i++) {
       Integer[] a1 = createSparseRandomArray(40000), a2 = a1.clone();
       ArrayUtil.quickSort(a1);
       Arrays.sort(a2);
@@ -163,7 +165,8 @@ public class TestArrayUtil extends Lucen
   }
   
   public void testMergeSort() {
-    for (int i = 0, c = 500 * RANDOM_MULTIPLIER; i < c; i++) {
+    int num = (TEST_NIGHTLY ? 500 : 50) * RANDOM_MULTIPLIER;
+    for (int i = 0; i < num; i++) {
       Integer[] a1 = createRandomArray(1000), a2 = a1.clone();
       ArrayUtil.mergeSort(a1);
       Arrays.sort(a2);

Modified: lucene/dev/branches/solr2452/solr/src/webapp/web/css/screen.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/webapp/web/css/screen.css?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/webapp/web/css/screen.css (original)
+++ lucene/dev/branches/solr2452/solr/src/webapp/web/css/screen.css Mon Jun  6 03:58:37 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,9 +108,6 @@ ul
 
 #main
 {
-    background-image: url( ../img/div.gif );
-    background-position: 200px 0;
-    background-repeat: repeat-y;
     border: 1px solid #c0c0c0;
     min-height: 600px;
     position: relative;
@@ -186,7 +182,7 @@ ul
 #menu-wrapper
 {
     float: left;
-    width: 201px;
+    width: 20%;
 }
 
 #menu p.loader
@@ -285,7 +281,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 +293,16 @@ ul
     display: none;
 }
 
-#menu li:last-child
+#menu .singlecore li: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;
@@ -307,6 +310,7 @@ ul
 
 #menu ul .active ul
 {
+    border-bottom: 1px solid #f0f0f0;
     display: block;
 }
 
@@ -405,7 +409,7 @@ ul
 #content-wrapper
 {
     float: right;
-    width: 799px;
+    width: 80%;
 }
 
 #content
@@ -865,14 +869,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
@@ -960,7 +964,7 @@ ul
 {
     display: none;
     float: right;
-    width: 560px;
+    width: 77%;
 }
 
 #content #query #result #url
@@ -2439,20 +2443,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

Modified: lucene/dev/branches/solr2452/solr/src/webapp/web/js/script.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/solr/src/webapp/web/js/script.js?rev=1132518&r1=1132517&r2=1132518&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/solr/src/webapp/web/js/script.js (original)
+++ lucene/dev/branches/solr2452/solr/src/webapp/web/js/script.js Mon Jun  6 03:58:37 2011
@@ -4158,9 +4158,17 @@ var solr_admin = function( app_config )
 
                     if( is_multicore )
                     {
+                        menu_element
+                            .addClass( 'multicore' );
+
                         $( '#cores', menu_element )
                             .show();
                     }
+                    else
+                    {
+                        menu_element
+                            .addClass( 'singlecore' );
+                    }
 
                     for( var core_name in response.status )
                     {