You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ha...@apache.org on 2013/07/16 19:00:18 UTC

svn commit: r1503797 [17/19] - in /lucene/dev/branches/lucene3069: ./ dev-tools/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/suggest/ dev-tools/idea/solr/contrib/dataimporthandler/ dev-tools/idea/solr/core/src/test/ dev-tools/maven/ dev-tools...

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXml.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXml.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXml.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXml.java Tue Jul 16 17:00:05 2013
@@ -17,37 +17,34 @@ package org.apache.solr.core;
  * limitations under the License.
  */
 
+import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.SolrTestCaseJ4;
+import org.junit.Rule;
 import org.junit.Test;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.io.InputStream;
 
 public class TestSolrXml extends SolrTestCaseJ4 {
+
+  @Rule
+  public TestRule solrTestRules = RuleChain.outerRule(new SystemPropertiesRestoreRule());
+
   private final File solrHome = new File(TEMP_DIR, TestSolrXml.getClassName() + File.separator + "solrHome");
 
   @Test
-  public void testAllInfoPresent() throws IOException, ParserConfigurationException, SAXException {
-    CoreContainer cc = null;
+  public void testAllInfoPresent() throws IOException {
+
     File testSrcRoot = new File(SolrTestCaseJ4.TEST_HOME());
     FileUtils.copyFile(new File(testSrcRoot, "solr-50-all.xml"), new File(solrHome, "solr.xml"));
+
+    SolrResourceLoader loader = null;
     try {
-      InputStream is = new FileInputStream(new File(solrHome, "solr.xml"));
-      Config config = new Config(new SolrResourceLoader("solr/collection1"), null, new InputSource(is), null, false);
-      boolean oldStyle = (config.getNode("solr/cores", false) != null);
-      ConfigSolr cfg;
-      if (oldStyle) {
-        cfg = new ConfigSolrXmlOld(config, cc);
-      } else {
-        cfg = new ConfigSolrXml(config, cc);
-      }
+      loader = new SolrResourceLoader(solrHome.getAbsolutePath());
+      ConfigSolr cfg = ConfigSolr.fromSolrHome(loader, solrHome.getAbsolutePath());
 
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_ADMINHANDLER, null), "testAdminHandler");
       assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_CORELOADTHREADS, 0), 11);
@@ -64,10 +61,6 @@ public class TestSolrXml extends SolrTes
       assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_LOGGING_WATCHER_THRESHOLD, 0), 99);
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_MANAGEMENTPATH, null), "testManagementPath");
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_SHAREDLIB, null), "testSharedLib");
-      assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_CLASS, null), "testHttpShardHandlerFactory");
-      assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_CONNTIMEOUT, 0), 110);
-      assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_NAME, null), "testShardHandlerFactory");
-      assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_SOCKETTIMEOUT, 0), 100);
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_SHARESCHEMA, null), "testShareSchema");
       assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_TRANSIENTCACHESIZE, 0), 66);
       assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_ZKCLIENTTIMEOUT, 0), 77);
@@ -75,61 +68,35 @@ public class TestSolrXml extends SolrTes
       assertNull("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_PERSISTENT, null));
       assertNull("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_CORES_DEFAULT_CORE_NAME, null));
       assertNull("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_ADMINPATH, null));
-    } finally {
-      if (cc != null) cc.shutdown();
     }
+    finally {
+      loader.close();
+    }
+
   }
 
   // Test  a few property substitutions that happen to be in solr-50-all.xml.
-  public void testPropretySub() throws IOException, ParserConfigurationException, SAXException {
+  public void testPropertySub() throws IOException {
 
-    String coreRoot = System.getProperty("coreRootDirectory");
-    String hostPort = System.getProperty("hostPort");
-    String shareSchema = System.getProperty("shareSchema");
-    String socketTimeout = System.getProperty("socketTimeout");
-    String connTimeout = System.getProperty("connTimeout");
     System.setProperty("coreRootDirectory", "myCoreRoot");
     System.setProperty("hostPort", "8888");
     System.setProperty("shareSchema", "newShareSchema");
     System.setProperty("socketTimeout", "220");
     System.setProperty("connTimeout", "200");
 
-    CoreContainer cc = null;
     File testSrcRoot = new File(SolrTestCaseJ4.TEST_HOME());
     FileUtils.copyFile(new File(testSrcRoot, "solr-50-all.xml"), new File(solrHome, "solr.xml"));
+
+    SolrResourceLoader loader = null;
     try {
-      InputStream is = new FileInputStream(new File(solrHome, "solr.xml"));
-      Config config = new Config(new SolrResourceLoader("solr/collection1"), null, new InputSource(is), null, false);
-      boolean oldStyle = (config.getNode("solr/cores", false) != null);
-      ConfigSolr cfg;
-      if (oldStyle) {
-        cfg = new ConfigSolrXmlOld(config, cc);
-      } else {
-        cfg = new ConfigSolrXml(config, cc);
-      }
+      loader = new SolrResourceLoader(solrHome.getAbsolutePath());
+      ConfigSolr cfg = ConfigSolr.fromSolrHome(loader, solrHome.getAbsolutePath());
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_COREROOTDIRECTORY, null), "myCoreRoot");
       assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_HOSTPORT, 0), 8888);
-      assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_CONNTIMEOUT, 0), 200);
-      assertEquals("Did not find expected value", cfg.getInt(ConfigSolr.CfgProp.SOLR_SHARDHANDLERFACTORY_SOCKETTIMEOUT, 0), 220);
       assertEquals("Did not find expected value", cfg.get(ConfigSolr.CfgProp.SOLR_SHARESCHEMA, null), "newShareSchema");
-
-    } finally {
-      if (cc != null) cc.shutdown();
-      if (coreRoot != null) System.setProperty("coreRootDirectory", coreRoot);
-      else System.clearProperty("coreRootDirectory");
-
-      if (hostPort != null) System.setProperty("hostPort", hostPort);
-      else System.clearProperty("hostPort");
-
-      if (shareSchema != null) System.setProperty("shareSchema", shareSchema);
-      else System.clearProperty("shareSchema");
-
-      if (socketTimeout != null) System.setProperty("socketTimeout", socketTimeout);
-      else System.clearProperty("socketTimeout");
-
-      if (connTimeout != null) System.setProperty("connTimeout", connTimeout);
-      else System.clearProperty("connTimeout");
-
+    }
+    finally {
+      loader.close();
     }
   }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java Tue Jul 16 17:00:05 2013
@@ -44,7 +44,7 @@ public class JsonLoaderTest extends Solr
     initCore("solrconfig.xml","schema.xml");
   }
   
-  static String input = ("{\n" +
+  static String input = json("{\n" +
       "\n" +
       "'add': {\n" +
       "  'doc': {\n" +
@@ -82,7 +82,7 @@ public class JsonLoaderTest extends Solr
       "'rollback': {}\n" +
       "\n" +
       "}\n" +
-      "").replace('\'', '"');
+      "");
 
 
   public void testParsing() throws Exception
@@ -236,7 +236,7 @@ public class JsonLoaderTest extends Solr
 
   @Test
   public void testNullValues() throws Exception {
-    updateJ("[{'id':'10','foo_s':null,'foo2_s':['hi',null,'there']}]".replace('\'', '"'), params("commit","true"));
+    updateJ( json( "[{'id':'10','foo_s':null,'foo2_s':['hi',null,'there']}]" ), params("commit","true"));
     assertJQ(req("q","id:10", "fl","foo_s,foo2_s")
         ,"/response/docs/[0]=={'foo2_s':['hi','there']}"
     );
@@ -381,8 +381,8 @@ public class JsonLoaderTest extends Solr
   @Test
   public void testAddNonStringValues() throws Exception {
     // BigInteger and BigDecimal should be typed as strings, since there is no direct support for them
-    updateJ(("[{'id':'1','boolean_b':false,'long_l':19,'double_d':18.6,'big_integer_s':12345678901234567890,"
-        +"      'big_decimal_s':0.1234567890123456789012345}]").replace('\'', '"'), params("commit","true"));
+    updateJ(json( "[{'id':'1','boolean_b':false,'long_l':19,'double_d':18.6,'big_integer_s':12345678901234567890,"
+        +"      'big_decimal_s':0.1234567890123456789012345}]" ), params("commit","true"));
     assertJQ(req("q","id:1", "fl","boolean_b,long_l,double_d,big_integer_s,big_decimal_s")
         ,"/response/docs/[0]=={'boolean_b':[false],'long_l':[19],'double_d':[18.6],"
                              +"'big_integer_s':['12345678901234567890'],"
@@ -395,8 +395,11 @@ public class JsonLoaderTest extends Solr
   public void testAddBigIntegerValueToTrieField() throws Exception {
     // Adding a BigInteger to a long field should fail
     // BigInteger.longValue() returns only the low-order 64 bits.
+
+    ignoreException("big_integer_t");
+
     try {
-      updateJ(("[{'id':'1','big_integer_tl':12345678901234567890}]").replace('\'', '"'), null);
+      updateJ(json( "[{'id':'1','big_integer_tl':12345678901234567890}]" ), null);
       fail("A BigInteger value should overflow a long field");
     } catch (SolrException e) {
       if ( ! (e.getCause() instanceof NumberFormatException)) {
@@ -407,7 +410,7 @@ public class JsonLoaderTest extends Solr
     // Adding a BigInteger to an integer field should fail
     // BigInteger.intValue() returns only the low-order 32 bits.
     try {
-      updateJ(("[{'id':'1','big_integer_ti':12345678901234567890}]").replace('\'', '"'), null);
+      updateJ(json( "[{'id':'1','big_integer_ti':12345678901234567890}]" ), null);
       fail("A BigInteger value should overflow an integer field");
     } catch (SolrException e) {
       if ( ! (e.getCause() instanceof NumberFormatException)) {
@@ -415,19 +418,20 @@ public class JsonLoaderTest extends Solr
       }
     }
 
+    unIgnoreException("big_integer_t");
   }
 
   @Test
   public void testAddBigDecimalValueToTrieField() throws Exception {
     // Adding a BigDecimal to a double field should succeed by reducing precision
-    updateJ(("[{'id':'1','big_decimal_td':100000000000000000000000000001234567890.0987654321}]").replace('\'', '"'),
+    updateJ(json( "[{'id':'1','big_decimal_td':100000000000000000000000000001234567890.0987654321}]" ),
             params("commit", "true"));
     assertJQ(req("q","id:1", "fl","big_decimal_td"), 
              "/response/docs/[0]=={'big_decimal_td':[1.0E38]}"
     );
 
     // Adding a BigDecimal to a float field should succeed by reducing precision
-    updateJ(("[{'id':'2','big_decimal_tf':100000000000000000000000000001234567890.0987654321}]").replace('\'', '"'),
+    updateJ(json( "[{'id':'2','big_decimal_tf':100000000000000000000000000001234567890.0987654321}]" ),
             params("commit", "true"));
     assertJQ(req("q","id:2", "fl","big_decimal_tf"),
              "/response/docs/[0]=={'big_decimal_tf':[1.0E38]}"

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java Tue Jul 16 17:00:05 2013
@@ -108,6 +108,25 @@ public class TestCSVLoader extends SolrT
   }
 
   @Test
+  public void testCSVRowId() throws Exception {
+    makeFile("id\n100\n101\n102");
+    loadLocal("rowid", "rowid_i");//add a special field
+    // check default commit of false
+    assertU(commit());
+    assertQ(req("rowid_i:1"),"//*[@numFound='1']");
+    assertQ(req("rowid_i:2"),"//*[@numFound='1']");
+    assertQ(req("rowid_i:100"),"//*[@numFound='0']");
+
+    makeFile("id\n200\n201\n202");
+    loadLocal("rowid", "rowid_i", "rowidOffset", "100");//add a special field
+    // check default commit of false
+    assertU(commit());
+    assertQ(req("rowid_i:101"),"//*[@numFound='1']");
+    assertQ(req("rowid_i:102"),"//*[@numFound='1']");
+    assertQ(req("rowid_i:10000"),"//*[@numFound='0']");
+  }
+
+  @Test
   public void testCommitFalse() throws Exception {
     makeFile("id\n100\n101\n102");
     loadLocal("commit","false");

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Tue Jul 16 17:00:05 2013
@@ -103,7 +103,7 @@ public class TestReplicationHandler exte
     super.setUp();
 //    System.setProperty("solr.directoryFactory", "solr.StandardDirectoryFactory");
     // For manual testing only
-    // useFactory(null); // force an FS factory
+    // useFactory(null); // force an FS factory.
     master = new SolrInstance("master", null);
     master.setUp();
     masterJetty = createJetty(master);
@@ -339,6 +339,40 @@ public class TestReplicationHandler exte
     }
   }
 
+
+  /**
+   * Verify that things still work if an IW has not been opened (and hence the CommitPoints have not been communicated to the deletion policy)
+   */
+  public void testNoWriter() throws Exception {
+    useFactory(null);    // force a persistent directory
+
+    // stop and start so they see the new directory setting
+    slaveJetty.stop();
+    masterJetty.stop();
+    slaveJetty.start(true);
+    masterJetty.start(true);
+
+    index(slaveClient, "id", "123456");
+    slaveClient.commit();
+    slaveJetty.stop();
+    slaveJetty.start(true);
+
+    // Currently we open a writer on-demand.  This is to test that we are correctly testing
+    // the code path when SolrDeletionPolicy.getLatestCommit() returns null.
+    // When we are using an ephemeral directory, an IW will always be opened to create the index and hence
+    // getLatestCommit will always be non-null.
+    CoreContainer cores = ((SolrDispatchFilter) slaveJetty.getDispatchFilter().getFilter()).getCores();
+    Collection<SolrCore> theCores = cores.getCores();
+    assertEquals(1, theCores.size());
+    SolrCore core = (SolrCore)theCores.toArray()[0];
+    assertNull( core.getDeletionPolicy().getLatestCommit() );
+
+
+    pullFromMasterToSlave();  // this will cause SnapPuller to be invoked and we will test when SolrDeletionPolicy.getLatestCommit() returns null
+
+    resetFactory();
+  }
+
   /**
    * Verify that empty commits and/or commits with openSearcher=false 
    * on the master do not cause subsequent replication problems on the slave 
@@ -1507,7 +1541,7 @@ public class TestReplicationHandler exte
     }
 
     public String getDataDir() {
-      return dataDir.toString();
+      return dataDir.getAbsolutePath();
     }
 
     public String getSolrConfigFile() {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java Tue Jul 16 17:00:05 2013
@@ -17,26 +17,25 @@
 
 package org.apache.solr.handler.admin;
 
-import org.apache.solr.core.CoreContainer;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.handler.admin.CoreAdminHandler;
+import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
+import org.apache.commons.io.FileUtils;
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CoreAdminParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.core.CoreDescriptor;
+import org.apache.solr.core.SolrCore;
+import org.apache.solr.core.SolrXMLCoresLocator;
 import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.SolrTestCaseJ4;
-
-import java.util.Map;
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.xpath.XPathExpressionException;
-
-import org.apache.commons.io.FileUtils;
-
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
-import org.xml.sax.SAXException;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+
+import java.io.File;
+import java.util.Map;
 
 public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
   
@@ -44,7 +43,89 @@ public class CoreAdminHandlerTest extend
   public static void beforeClass() throws Exception {
     initCore("solrconfig.xml", "schema.xml");
   }
-  
+
+  @Rule
+  public TestRule solrTestRules = RuleChain.outerRule(new SystemPropertiesRestoreRule());
+
+  public String getCoreName() { return this.getClass().getName() + "_sys_vars"; }
+
+  @Test
+  public void testCreateWithSysVars() throws Exception {
+    useFactory(null); // I require FS-based indexes for this test.
+
+    final File workDir = new File(TEMP_DIR, getCoreName());
+
+    if (workDir.exists()) {
+      FileUtils.deleteDirectory(workDir);
+    }
+    assertTrue("Failed to mkdirs workDir", workDir.mkdirs());
+    String coreName = "with_sys_vars";
+    File instDir = new File(workDir, coreName);
+    File subHome = new File(instDir, "conf");
+    assertTrue("Failed to make subdirectory ", subHome.mkdirs());
+
+    // Be sure we pick up sysvars when we create this
+    String srcDir = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
+    FileUtils.copyFile(new File(srcDir, "schema-tiny.xml"), new File(subHome, "schema_ren.xml"));
+    FileUtils.copyFile(new File(srcDir, "solrconfig-minimal.xml"), new File(subHome, "solrconfig_ren.xml"));
+    FileUtils.copyFile(new File(srcDir, "solrconfig.snippet.randomindexconfig.xml"),
+        new File(subHome, "solrconfig.snippet.randomindexconfig.xml"));
+
+    final CoreContainer cores = h.getCoreContainer();
+    SolrXMLCoresLocator.NonPersistingLocator locator
+        = (SolrXMLCoresLocator.NonPersistingLocator) cores.getCoresLocator();
+
+    final CoreAdminHandler admin = new CoreAdminHandler(cores);
+
+    // create a new core (using CoreAdminHandler) w/ properties
+    System.setProperty("INSTDIR_TEST", instDir.getAbsolutePath());
+    System.setProperty("CONFIG_TEST", "solrconfig_ren.xml");
+    System.setProperty("SCHEMA_TEST", "schema_ren.xml");
+
+    File dataDir = new File(workDir.getAbsolutePath(), "data_diff");
+    System.setProperty("DATA_TEST", dataDir.getAbsolutePath());
+
+    SolrQueryResponse resp = new SolrQueryResponse();
+    admin.handleRequestBody
+        (req(CoreAdminParams.ACTION,
+            CoreAdminParams.CoreAdminAction.CREATE.toString(),
+            CoreAdminParams.NAME, getCoreName(),
+            CoreAdminParams.INSTANCE_DIR, "${INSTDIR_TEST}",
+            CoreAdminParams.CONFIG, "${CONFIG_TEST}",
+            CoreAdminParams.SCHEMA, "${SCHEMA_TEST}",
+            CoreAdminParams.DATA_DIR, "${DATA_TEST}"),
+            resp);
+    assertNull("Exception on create", resp.getException());
+
+    // First assert that these values are persisted.
+    h.validateXPath
+        (locator.xml
+            ,"/solr/cores/core[@name='" + getCoreName() + "' and @instanceDir='${INSTDIR_TEST}']"
+            ,"/solr/cores/core[@name='" + getCoreName() + "' and @dataDir='${DATA_TEST}']"
+            ,"/solr/cores/core[@name='" + getCoreName() + "' and @schema='${SCHEMA_TEST}']"
+            ,"/solr/cores/core[@name='" + getCoreName() + "' and @config='${CONFIG_TEST}']"
+        );
+
+    // Now assert that certain values are properly dereferenced in the process of creating the core, see
+    // SOLR-4982.
+
+    // Should NOT be a datadir named ${DATA_TEST} (literal). This is the bug after all
+    File badDir = new File(instDir, "${DATA_TEST}");
+    assertFalse("Should have substituted the sys var, found file " + badDir.getAbsolutePath(), badDir.exists());
+
+    // For the other 3 vars, we couldn't get past creating the core fi dereferencing didn't work correctly.
+
+    // Should have segments in the directory pointed to by the ${DATA_TEST}.
+    File test = new File(dataDir, "index");
+    assertTrue("Should have found index dir at " + test.getAbsolutePath(), test.exists());
+    test = new File(test,"segments.gen");
+    assertTrue("Should have found segments.gen at " + test.getAbsolutePath(), test.exists());
+
+    // Cleanup
+    FileUtils.deleteDirectory(workDir);
+
+  }
+
   @Test
   public void testCoreAdminHandler() throws Exception {
     final File workDir = new File(TEMP_DIR, this.getClass().getName());
@@ -55,7 +136,6 @@ public class CoreAdminHandlerTest extend
     assertTrue("Failed to mkdirs workDir", workDir.mkdirs());
     
     final CoreContainer cores = h.getCoreContainer();
-    cores.setPersistent(false); // we'll do this explicitly as needed
 
     final CoreAdminHandler admin = new CoreAdminHandler(cores);
 
@@ -88,18 +168,13 @@ public class CoreAdminHandlerTest extend
        resp);
     assertNull("Exception on create", resp.getException());
 
-    // verify props are in persisted file
-
-    final File xml = new File(workDir, "persist-solr.xml");
-    cores.persistFile(xml);
-    
-    assertXmlFile
-      (xml
-       ,"/solr/cores/core[@name='props']/property[@name='hoss' and @value='man']"
-       ,"/solr/cores/core[@name='props']/property[@name='foo' and @value='baz']"
-       );
+    CoreDescriptor cd = cores.getCoreDescriptor("props");
+    assertNotNull("Core not added!", cd);
+    assertEquals(cd.getCoreProperty("hoss", null), "man");
+    assertEquals(cd.getCoreProperty("foo", null), "baz");
 
     // attempt to create a bogus core and confirm failure
+    ignoreException("Could not load config");
     try {
       resp = new SolrQueryResponse();
       admin.handleRequestBody
@@ -113,6 +188,7 @@ public class CoreAdminHandlerTest extend
       // :NOOP:
       // :TODO: CoreAdminHandler's exception messages are terrible, otherwise we could assert something useful here
     }
+    unIgnoreException("Could not load config");
 
     // check specifically for status of the failed core name
     resp = new SolrQueryResponse();
@@ -141,6 +217,8 @@ public class CoreAdminHandlerTest extend
                
     // :TODO: because of SOLR-3665 we can't ask for status from all cores
 
-  }
+    // cleanup
+    FileUtils.deleteDirectory(workDir);
 
+  }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java Tue Jul 16 17:00:05 2013
@@ -17,15 +17,22 @@
 
 package org.apache.solr.handler.admin;
 
-import java.util.logging.Logger;
-
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.params.CommonParams;
-import org.apache.solr.logging.jul.JulInfo;
+import org.apache.solr.logging.log4j.Log4jInfo;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+
 public class LoggingHandlerTest extends SolrTestCaseJ4 {
+
+  // TODO: This only tests Log4j at the moment, as that's what's defined
+  // through the CoreContainer.
+
+  // TODO: Would be nice to throw an exception on trying to set a
+  // log level that doesn't exist
   
   @BeforeClass
   public static void beforeClass() throws Exception {
@@ -35,7 +42,8 @@ public class LoggingHandlerTest extends 
   @Test
   public void testLogLevelHandlerOutput() throws Exception {
     Logger tst = Logger.getLogger("org.apache.solr.SolrTestCaseJ4");
-    JulInfo wrap = new JulInfo(tst.getName(), tst);
+    tst.setLevel(Level.INFO);
+    Log4jInfo wrap = new Log4jInfo(tst.getName(), tst);
     
     assertQ("Show Log Levels OK",
             req(CommonParams.QT,"/admin/logging")
@@ -46,8 +54,8 @@ public class LoggingHandlerTest extends 
     assertQ("Set and remove a level",
             req(CommonParams.QT,"/admin/logging",  
                 "set", "org.xxx.yyy.abc:null",
-                "set", "org.xxx.yyy.zzz:FINEST")
-            ,"//arr[@name='loggers']/lst/str[.='org.xxx.yyy.zzz']/../str[@name='level'][.='FINEST']"
+                "set", "org.xxx.yyy.zzz:TRACE")
+            ,"//arr[@name='loggers']/lst/str[.='org.xxx.yyy.zzz']/../str[@name='level'][.='TRACE']"
             );
   }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java Tue Jul 16 17:00:05 2013
@@ -17,17 +17,18 @@
 
 package org.apache.solr.handler.admin;
 
-import java.util.Arrays;
-import java.util.EnumSet;
-
 import org.apache.solr.common.luke.FieldFlag;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.util.AbstractSolrTestCase;
+import org.apache.solr.util.TestHarness;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.Arrays;
+import java.util.EnumSet;
+
 /**
  * :TODO: currently only tests some of the utilities in the LukeRequestHandler
  */
@@ -156,7 +157,7 @@ public class LukeRequestHandlerTest exte
     try {
       // First, determine that the two fields ARE there
       String response = h.query(req);
-      assertNull(h.validateXPath(response,
+      assertNull(TestHarness.validateXPath(response,
           getFieldXPathPrefix("solr_t") + "[@name='index']",
           getFieldXPathPrefix("solr_s") + "[@name='index']"
       ));
@@ -165,7 +166,7 @@ public class LukeRequestHandlerTest exte
       for (String f : Arrays.asList("solr_ti",
           "solr_td", "solr_pl", "solr_dt", "solr_b")) {
 
-        assertNotNull(h.validateXPath(response,
+        assertNotNull(TestHarness.validateXPath(response,
             getFieldXPathPrefix(f) + "[@name='index']"));
 
       }
@@ -175,7 +176,7 @@ public class LukeRequestHandlerTest exte
       for (String f : Arrays.asList("solr_t", "solr_s", "solr_ti",
           "solr_td", "solr_pl", "solr_dt", "solr_b")) {
 
-        assertNull(h.validateXPath(response,
+        assertNull(TestHarness.validateXPath(response,
             getFieldXPathPrefix(f) + "[@name='index']"));
       }
     } catch (Exception e) {
@@ -187,7 +188,7 @@ public class LukeRequestHandlerTest exte
     SolrQueryRequest req = req("qt", "/admin/luke", "show", "schema");
 
     String xml = h.query(req);
-    String r = h.validateXPath
+    String r = TestHarness.validateXPath
       (xml,
        field("text") + "/arr[@name='copySources']/str[.='title']",
        field("text") + "/arr[@name='copySources']/str[.='subject']",
@@ -217,7 +218,7 @@ public class LukeRequestHandlerTest exte
 
     SolrQueryRequest req = req("qt", "/admin/luke", "show", "schema", "indent", "on");
     String xml = h.query(req);
-    String result = h.validateXPath(xml, field("bday") + "/arr[@name='copyDests']/str[.='catchall_t']");
+    String result = TestHarness.validateXPath(xml, field("bday") + "/arr[@name='copyDests']/str[.='catchall_t']");
     assertNull(xml, result);
 
     // Put back the configuration expected by the rest of the tests in this suite

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java Tue Jul 16 17:00:05 2013
@@ -19,7 +19,6 @@ package org.apache.solr.handler.componen
  */
 
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
 /**
@@ -34,14 +33,7 @@ public class BadComponentTest extends So
       ignoreException(".*QueryElevationComponent.*");
       System.setProperty("elevate.file", "foo.xml");
       initCore("solrconfig-elevate.xml", "schema12.xml");
-      assertTrue(false);
-    } catch (RuntimeException e) {
-      //TODO: better way of checking this?
-      if (e.getCause() instanceof SolrException){
-        assertTrue(true);
-      } else {
-        assertTrue(false);
-      }
+      assertTrue(hasInitException("QueryElevationComponent"));
     } finally {
       System.clearProperty("elevate.file");
       resetExceptionIgnores();

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/highlight/HighlighterTest.java Tue Jul 16 17:00:05 2013
@@ -30,7 +30,6 @@ import org.junit.After;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.StringReader;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -175,7 +174,7 @@ public class HighlighterTest extends Sol
   public void testTermOffsetsTokenStream() throws Exception {
     String[] multivalued = { "a b c d", "e f g", "h", "i j k l m n" };
     Analyzer a1 = new WhitespaceAnalyzer(TEST_VERSION_CURRENT);
-    TokenStream tokenStream = a1.tokenStream("", new StringReader("a b c d e f g h i j k l m n"));
+    TokenStream tokenStream = a1.tokenStream("", "a b c d e f g h i j k l m n");
     tokenStream.reset();
 
     TermOffsetsTokenStream tots = new TermOffsetsTokenStream(
@@ -183,7 +182,7 @@ public class HighlighterTest extends Sol
     for( String v : multivalued ){
       TokenStream ts1 = tots.getMultiValuedTokenStream( v.length() );
       Analyzer a2 = new WhitespaceAnalyzer(TEST_VERSION_CURRENT);
-      TokenStream ts2 = a2.tokenStream("", new StringReader(v));
+      TokenStream ts2 = a2.tokenStream("", v);
       ts2.reset();
 
       while (ts1.incrementToken()) {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java Tue Jul 16 17:00:05 2013
@@ -621,6 +621,13 @@ public class SimpleFacetsTest extends So
                 )
             ,"*[count(//lst[@name='zerolen_s']/int)=1]"
      );
+
+    assertQ("a facet.query that analyzes to no query shoud not NPE",
+        req("q", "*:*",
+            "facet", "true",
+            "facet.query", "{!field key=k f=lengthfilt}a"),//2 char minimum
+        "//lst[@name='facet_queries']/int[@name='k'][.='0']"
+    );
   }
 
   public static void indexDateFacets() {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/rest/schema/TestManagedSchemaFieldResource.java Tue Jul 16 17:00:05 2013
@@ -58,22 +58,21 @@ public class TestManagedSchemaFieldResou
   @Test
   public void testAddFieldBadFieldType() throws Exception {
     assertJPut("/schema/fields/newfield",
-        "{\"type\":\"not_in_there_at_all\",\"stored\":\"false\"}",
+        json( "{'type':'not_in_there_at_all','stored':'false'}" ),
         "/error/msg==\"Field \\'newfield\\': Field type \\'not_in_there_at_all\\' not found.\"");
   }
 
   @Test
   public void testAddFieldMismatchedName() throws Exception {
     assertJPut("/schema/fields/newfield",
-        "{\"name\":\"something_else\",\"type\":\"text\",\"stored\":\"false\"}",
-        "/error/msg==\"Field name in the request body \\'something_else\\'"
-            + " doesn\\'t match field name in the request URL \\'newfield\\'\"");
+        json( "{'name':'something_else','type':'text','stored':'false'}" ),
+        "/error/msg=='///regex:newfield///'");
   }
   
   @Test
   public void testAddFieldBadProperty() throws Exception {
     assertJPut("/schema/fields/newfield",
-        "{\"type\":\"text\",\"no_property_with_this_name\":\"false\"}",
+        json( "{'type':'text','no_property_with_this_name':'false'}" ),
         "/error/msg==\"java.lang.IllegalArgumentException: Invalid field property: no_property_with_this_name\"");
   }
   
@@ -85,7 +84,7 @@ public class TestManagedSchemaFieldResou
             "/response/lst[@name='error']/int[@name='code'] = '404'");
     
     assertJPut("/schema/fields/newfield",
-        "{\"type\":\"text\",\"stored\":\"false\"}",
+        json( "{'type':'text','stored':'false'}" ),
         "/responseHeader/status==0");
     
     assertQ("/schema/fields/newfield?indent=on&wt=xml",
@@ -103,6 +102,42 @@ public class TestManagedSchemaFieldResou
   }
 
   @Test
+  public void testAddCopyField() throws Exception {
+    assertQ("/schema/fields/newfield2?indent=on&wt=xml",
+            "count(/response/lst[@name='field']) = 0",
+            "/response/lst[@name='responseHeader']/int[@name='status'] = '404'",
+            "/response/lst[@name='error']/int[@name='code'] = '404'");
+
+    assertJPut("/schema/fields/fieldA",
+        "{\"type\":\"text\",\"stored\":\"false\"}",
+        "/responseHeader/status==0");
+    assertJPut("/schema/fields/fieldB",
+        "{\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[\"fieldA\"]}",
+        "/responseHeader/status==0");
+    assertJPut("/schema/fields/fieldC",
+        "{\"type\":\"text\",\"stored\":\"false\", \"copyFields\":\"fieldA\"}",
+        "/responseHeader/status==0");
+
+    assertQ("/schema/fields/fieldB?indent=on&wt=xml",
+            "count(/response/lst[@name='field']) = 1",
+            "/response/lst[@name='responseHeader']/int[@name='status'] = '0'");
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldB",
+        "count(/response/arr[@name='copyFields']/lst) = 1"
+    );
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldC",
+        "count(/response/arr[@name='copyFields']/lst) = 1"
+    );
+    //fine to pass in empty list, just won't do anything
+    assertJPut("/schema/fields/fieldD",
+        "{\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[]}",
+        "/responseHeader/status==0");
+    //some bad usages
+    assertJPut("/schema/fields/fieldF",
+        "{\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[\"some_nonexistent_field_ignore_exception\"]}",
+        "/error/msg==\"copyField dest :\\'some_nonexistent_field_ignore_exception\\' is not an explicit field and doesn\\'t match a dynamicField.\"");
+  }
+
+  @Test
   public void testPostMultipleFields() throws Exception {
     assertQ("/schema/fields/newfield1?indent=on&wt=xml",
             "count(/response/lst[@name='field']) = 0",
@@ -142,5 +177,59 @@ public class TestManagedSchemaFieldResou
         "count(/response/result[@name='response']/doc/*) = 1",
         "/response/result[@name='response']/doc/str[@name='id'][.='456']");
   }
+
+  @Test
+  public void testPostCopy() throws Exception {
+    assertJPost("/schema/fields",
+        json(    "[{'name':'fieldA','type':'text','stored':'false'},"
+               + " {'name':'fieldB','type':'text','stored':'false'},"
+               + " {'name':'fieldC','type':'text','stored':'false', 'copyFields':['fieldB']}]" ),
+                "/responseHeader/status==0");
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldC",
+        "count(/response/arr[@name='copyFields']/lst) = 1"
+    );
+    assertJPost("/schema/fields",
+              "[{\"name\":\"fieldD\",\"type\":\"text\",\"stored\":\"false\"},"
+               + "{\"name\":\"fieldE\",\"type\":\"text\",\"stored\":\"false\"},"
+               + " {\"name\":\"fieldF\",\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[\"fieldD\",\"fieldE\"]},"
+               + " {\"name\":\"fieldG\",\"type\":\"text\",\"stored\":\"false\", \"copyFields\":\"fieldD\"}"//single
+               + "]",
+                "/responseHeader/status==0");
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldF",
+        "count(/response/arr[@name='copyFields']/lst) = 2"
+    );
+    //passing in an empty list is perfectly acceptable, it just won't do anything
+    assertJPost("/schema/fields",
+        "[{\"name\":\"fieldX\",\"type\":\"text\",\"stored\":\"false\"},"
+            + "{\"name\":\"fieldY\",\"type\":\"text\",\"stored\":\"false\"},"
+            + " {\"name\":\"fieldZ\",\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[]}]",
+        "/responseHeader/status==0");
+    //some bad usages
+
+    assertJPost("/schema/fields",
+              "[{\"name\":\"fieldH\",\"type\":\"text\",\"stored\":\"false\"},"
+               + "{\"name\":\"fieldI\",\"type\":\"text\",\"stored\":\"false\"},"
+               + " {\"name\":\"fieldJ\",\"type\":\"text\",\"stored\":\"false\", \"copyFields\":[\"some_nonexistent_field_ignore_exception\"]}]",
+                "/error/msg==\"copyField dest :\\'some_nonexistent_field_ignore_exception\\' is not an explicit field and doesn\\'t match a dynamicField.\"");
+  }
+
+  @Test
+  public void testPostCopyFields() throws Exception {
+    assertJPost("/schema/fields",
+              "[{\"name\":\"fieldA\",\"type\":\"text\",\"stored\":\"false\"},"
+               + "{\"name\":\"fieldB\",\"type\":\"text\",\"stored\":\"false\"},"
+               + "{\"name\":\"fieldC\",\"type\":\"text\",\"stored\":\"false\"},"
+                  + "{\"name\":\"fieldD\",\"type\":\"text\",\"stored\":\"false\"},"
+               + " {\"name\":\"fieldE\",\"type\":\"text\",\"stored\":\"false\"}]",
+                "/responseHeader/status==0");
+    assertJPost("/schema/copyfields", "[{\"source\":\"fieldA\", \"dest\":\"fieldB\"},{\"source\":\"fieldD\", \"dest\":[\"fieldC\", \"fieldE\"]}]", "/responseHeader/status==0");
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldA",
+        "count(/response/arr[@name='copyFields']/lst) = 1");
+    assertQ("/schema/copyfields/?indent=on&wt=xml&source.fl=fieldD",
+        "count(/response/arr[@name='copyFields']/lst) = 2");
+    assertJPost("/schema/copyfields", "[{\"source\":\"some_nonexistent_field_ignore_exception\", \"dest\":[\"fieldA\"]}]", "/error/msg==\"copyField source :\\'some_nonexistent_field_ignore_exception\\' is not a glob and doesn\\'t match any explicit field or dynamicField.\"");
+    assertJPost("/schema/copyfields", "[{\"source\":\"fieldD\", \"dest\":[\"some_nonexistent_field_ignore_exception\"]}]", "/error/msg==\"copyField dest :\\'some_nonexistent_field_ignore_exception\\' is not an explicit field and doesn\\'t match a dynamicField.\"");
+  }
+
 }
 

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/PrimitiveFieldTypeTest.java Tue Jul 16 17:00:05 2013
@@ -59,11 +59,9 @@ public class PrimitiveFieldTypeTest exte
     TrieIntField ti;
     SortableIntField si;
     LongField l;
-    ShortField sf;
     FloatField f;
     DoubleField d;
     BoolField b;
-    ByteField bf;
     
     
     // ***********************
@@ -95,10 +93,6 @@ public class PrimitiveFieldTypeTest exte
     l.init(schema, initMap);
     assertFalse(l.hasProperty(FieldType.OMIT_NORMS));
 
-    sf = new ShortField();
-    sf.init(schema, initMap);
-    assertFalse(sf.hasProperty(FieldType.OMIT_NORMS));
-
     f = new FloatField();
     f.init(schema, initMap);
     assertFalse(f.hasProperty(FieldType.OMIT_NORMS));
@@ -115,10 +109,6 @@ public class PrimitiveFieldTypeTest exte
     b.init(schema, initMap);
     assertFalse(b.hasProperty(FieldType.OMIT_NORMS));
 
-    bf = new ByteField();
-    bf.init(schema, initMap);
-    assertFalse(bf.hasProperty(FieldType.OMIT_NORMS));
-
     // Non-primitive fields
     t = new TextField();
     t.init(schema, initMap);
@@ -157,10 +147,6 @@ public class PrimitiveFieldTypeTest exte
     l.init(schema, initMap);
     assertTrue(l.hasProperty(FieldType.OMIT_NORMS));
 
-    sf = new ShortField();
-    sf.init(schema, initMap);
-    assertTrue(sf.hasProperty(FieldType.OMIT_NORMS));
-
     f = new FloatField();
     f.init(schema, initMap);
     assertTrue(f.hasProperty(FieldType.OMIT_NORMS));
@@ -177,10 +163,6 @@ public class PrimitiveFieldTypeTest exte
     b.init(schema, initMap);
     assertTrue(b.hasProperty(FieldType.OMIT_NORMS));
 
-    bf = new ByteField();
-    bf.init(schema, initMap);
-    assertTrue(bf.hasProperty(FieldType.OMIT_NORMS));
-
     // Non-primitive fields
     t = new TextField();
     t.init(schema, initMap);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestCollationField.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestCollationField.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestCollationField.java Tue Jul 16 17:00:05 2013
@@ -74,6 +74,7 @@ public class TestCollationField extends 
     
     // copy over configuration files
     FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), new File(confDir, "solrconfig.xml"));
+    FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml"), new File(confDir, "solrconfig.snippet.randomindexconfig.xml"));
     FileUtils.copyFile(getFile("solr/collection1/conf/schema-collate.xml"), new File(confDir, "schema.xml"));
     
     // generate custom collation rules (DIN 5007-2), saving to customrules.dat

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java Tue Jul 16 17:00:05 2013
@@ -55,7 +55,9 @@ public class TestManagedSchema extends A
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-mutable-managed-schema.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-managed-schema.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-basic.xml"), tmpConfDir);
+    FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig.snippet.randomindexconfig.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-one-field-no-dynamic-field.xml"), tmpConfDir);
+    FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-one-field-no-dynamic-field-unique-key.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-minimal.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema_codec.xml"), tmpConfDir);
     FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-bm25.xml"), tmpConfDir);
@@ -385,4 +387,39 @@ public class TestManagedSchema extends A
     assertQ(req(fieldName + ":thing"), "//*[@numFound='1']");
   }
 
+  public void testPersistUniqueKey() throws Exception {
+    assertSchemaResource(collection, "managed-schema");
+    deleteCore();
+    File managedSchemaFile = new File(tmpConfDir, "managed-schema");
+    assertTrue(managedSchemaFile.delete()); // Delete managed-schema so it won't block parsing a new schema
+    initCore("solrconfig-mutable-managed-schema.xml", "schema-one-field-no-dynamic-field-unique-key.xml", tmpSolrHome.getPath());
+
+    assertTrue(managedSchemaFile.exists());
+    String managedSchemaContents = FileUtils.readFileToString(managedSchemaFile, "UTF-8");
+    assertFalse(managedSchemaContents.contains("\"new_field\""));
+
+    Map<String,Object> options = new HashMap<String,Object>();
+    options.put("stored", "false");
+    IndexSchema oldSchema = h.getCore().getLatestSchema();
+    assertEquals("str", oldSchema.getUniqueKeyField().getName());
+    String fieldName = "new_field";
+    String fieldType = "string";
+    SchemaField newField = oldSchema.newField(fieldName, fieldType, options);
+    IndexSchema newSchema = oldSchema.addField(newField);
+    assertEquals("str", newSchema.getUniqueKeyField().getName());
+    h.getCore().setLatestSchema(newSchema);
+    log.info("####close harness");
+    h.close();
+    log.info("####close harness end");
+    initCore();
+
+    assertTrue(managedSchemaFile.exists());
+    FileInputStream stream = new FileInputStream(managedSchemaFile);
+    managedSchemaContents = IOUtils.toString(stream, "UTF-8");
+    stream.close(); // Explicitly close so that Windows can delete this file
+    assertTrue(managedSchemaContents.contains("<field name=\"new_field\" type=\"string\" stored=\"false\"/>"));
+    IndexSchema newNewSchema = h.getCore().getLatestSchema();
+    assertNotNull(newNewSchema.getUniqueKeyField());
+    assertEquals("str", newNewSchema.getUniqueKeyField().getName());
+  }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestFoldingMultitermQuery.java Tue Jul 16 17:00:05 2013
@@ -46,8 +46,6 @@ public class TestFoldingMultitermQuery e
           "float_f", num,
           "long_f", num,
           "double_f", num,
-          "byte_f", num,
-          "short_f", num,
           "bool_f", boolVal,
           "date_f", "200" + Integer.toString(i % 10) + "-01-01T00:00:00Z",
           "content", docs[i],
@@ -269,7 +267,7 @@ public class TestFoldingMultitermQuery e
 
   @Test
   public void testNonTextTypes() {
-    String[] intTypes = {"int_f", "float_f", "long_f", "double_f", "byte_f", "short_f"};
+    String[] intTypes = {"int_f", "float_f", "long_f", "double_f"};
 
     for (String str : intTypes) {
       assertQ(req("q", str + ":" + "0"),

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRecovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRecovery.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRecovery.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRecovery.java Tue Jul 16 17:00:05 2013
@@ -17,6 +17,8 @@
 package org.apache.solr.search;
 
 
+import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
+
 import org.apache.solr.common.SolrException;
 import org.noggit.ObjectBuilder;
 import org.apache.solr.SolrTestCaseJ4;
@@ -42,8 +44,16 @@ import java.util.concurrent.Future;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 
-import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
-import static org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase;
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.update.DirectUpdateHandler2;
+import org.apache.solr.update.UpdateHandler;
+import org.apache.solr.update.UpdateLog;
+import org.apache.solr.update.processor.DistributedUpdateProcessor.DistribPhase;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.noggit.ObjectBuilder;
 
 public class TestRecovery extends SolrTestCaseJ4 {
 
@@ -744,16 +754,17 @@ public class TestRecovery extends SolrTe
       clearIndex();
       assertU(commit());
 
-      File logDir = h.getCore().getUpdateHandler().getUpdateLog().getLogDir();
+      UpdateLog ulog = h.getCore().getUpdateHandler().getUpdateLog();
+      File logDir = new File(h.getCore().getUpdateHandler().getUpdateLog().getLogDir());
 
       h.close();
 
-      String[] files = UpdateLog.getLogList(logDir);
+      String[] files = ulog.getLogList(logDir);
       for (String file : files) {
         new File(logDir, file).delete();
       }
 
-      assertEquals(0, UpdateLog.getLogList(logDir).length);
+      assertEquals(0, ulog.getLogList(logDir).length);
 
       createCore();
 
@@ -771,7 +782,7 @@ public class TestRecovery extends SolrTe
       assertU(commit());
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
 
-      assertEquals(2, UpdateLog.getLogList(logDir).length);
+      assertEquals(2, ulog.getLogList(logDir).length);
 
       addDocs(105, start, versions);  start+=105;
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
@@ -779,7 +790,7 @@ public class TestRecovery extends SolrTe
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
 
       // previous two logs should be gone now
-      assertEquals(1, UpdateLog.getLogList(logDir).length);
+      assertEquals(1, ulog.getLogList(logDir).length);
 
       addDocs(1, start, versions);  start+=1;
       h.close();
@@ -799,14 +810,14 @@ public class TestRecovery extends SolrTe
       assertJQ(req("qt","/get", "getVersions",""+maxReq), "/versions==" + versions.subList(0,Math.min(maxReq,start)));
 
       // previous logs should be gone now
-      assertEquals(1, UpdateLog.getLogList(logDir).length);
+      assertEquals(1, ulog.getLogList(logDir).length);
 
       //
       // test that a corrupt tlog file doesn't stop us from coming up, or seeing versions before that tlog file.
       //
       addDocs(1, start, new LinkedList<Long>()); // don't add this to the versions list because we are going to lose it...
       h.close();
-      files = UpdateLog.getLogList(logDir);
+      files = ulog.getLogList(logDir);
       Arrays.sort(files);
       RandomAccessFile raf = new RandomAccessFile(new File(logDir, files[files.length-1]), "rw");
       raf.writeChars("This is a trashed log file that really shouldn't work at all, but we'll see...");
@@ -854,7 +865,8 @@ public class TestRecovery extends SolrTe
         }
       };
 
-      File logDir = h.getCore().getUpdateHandler().getUpdateLog().getLogDir();
+      UpdateLog ulog = h.getCore().getUpdateHandler().getUpdateLog();
+      File logDir = new File(h.getCore().getUpdateHandler().getUpdateLog().getLogDir());
 
       clearIndex();
       assertU(commit());
@@ -864,7 +876,7 @@ public class TestRecovery extends SolrTe
       assertU(adoc("id","F3"));
 
       h.close();
-      String[] files = UpdateLog.getLogList(logDir);
+      String[] files = ulog.getLogList(logDir);
       Arrays.sort(files);
       RandomAccessFile raf = new RandomAccessFile(new File(logDir, files[files.length-1]), "rw");
       raf.seek(raf.length());  // seek to end
@@ -908,7 +920,8 @@ public class TestRecovery extends SolrTe
     try {
       DirectUpdateHandler2.commitOnClose = false;
 
-      File logDir = h.getCore().getUpdateHandler().getUpdateLog().getLogDir();
+      UpdateLog ulog = h.getCore().getUpdateHandler().getUpdateLog();
+      File logDir = new File(h.getCore().getUpdateHandler().getUpdateLog().getLogDir());
 
       clearIndex();
       assertU(commit());
@@ -920,7 +933,7 @@ public class TestRecovery extends SolrTe
       h.close();
 
 
-      String[] files = UpdateLog.getLogList(logDir);
+      String[] files = ulog.getLogList(logDir);
       Arrays.sort(files);
       RandomAccessFile raf = new RandomAccessFile(new File(logDir, files[files.length-1]), "rw");
       long len = raf.length();
@@ -991,7 +1004,8 @@ public class TestRecovery extends SolrTe
         }
       };
 
-      File logDir = h.getCore().getUpdateHandler().getUpdateLog().getLogDir();
+      UpdateLog ulog = h.getCore().getUpdateHandler().getUpdateLog();
+      File logDir = new File(h.getCore().getUpdateHandler().getUpdateLog().getLogDir());
 
       clearIndex();
       assertU(commit());
@@ -1001,7 +1015,7 @@ public class TestRecovery extends SolrTe
       assertU(adoc("id","CCCCCC"));
 
       h.close();
-      String[] files = UpdateLog.getLogList(logDir);
+      String[] files = ulog.getLogList(logDir);
       Arrays.sort(files);
       String fname = files[files.length-1];
       RandomAccessFile raf = new RandomAccessFile(new File(logDir, fname), "rw");
@@ -1071,17 +1085,18 @@ public class TestRecovery extends SolrTe
 
   // stops the core, removes the transaction logs, restarts the core.
   void deleteLogs() throws Exception {
-    File logDir = h.getCore().getUpdateHandler().getUpdateLog().getLogDir();
+    UpdateLog ulog = h.getCore().getUpdateHandler().getUpdateLog();
+    File logDir = new File(h.getCore().getUpdateHandler().getUpdateLog().getLogDir());
 
     h.close();
 
     try {
-      String[] files = UpdateLog.getLogList(logDir);
+      String[] files = ulog.getLogList(logDir);
       for (String file : files) {
         new File(logDir, file).delete();
       }
 
-      assertEquals(0, UpdateLog.getLogList(logDir).length);
+      assertEquals(0, ulog.getLogList(logDir).length);
     } finally {
       // make sure we create the core again, even if the assert fails so it won't mess
       // up the next test.

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial.java Tue Jul 16 17:00:05 2013
@@ -73,12 +73,14 @@ public class TestSolr4Spatial extends So
         "fl", "id," + fieldName, "q", "*:*", "rows", "1000",
         "fq", "{!field f="+fieldName+"}Intersectssss"), 400);
 
+    ignoreException("NonexistentShape");
     try {
       assertU(adoc("id", "-1", fieldName, "NonexistentShape"));
       fail();
     } catch (SolrException e) {
       assertEquals(400, e.code());
     }
+    unIgnoreException("NonexistentShape");
   }
 
   private void setupDocs() {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestValueSourceCache.java Tue Jul 16 17:00:05 2013
@@ -78,8 +78,6 @@ public class TestValueSourceCache extend
         "val1_i1",
         "val1_l1",
         "val1_b1",
-        "val1_by1",
-        "val1_sh1"
     };
     for (String template : templates) {
       for (String nums : numbers) {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SimpleQueryConverter.java Tue Jul 16 17:00:05 2013
@@ -29,7 +29,6 @@ import org.apache.lucene.util.Version;
 
 import java.util.Collection;
 import java.util.HashSet;
-import java.io.StringReader;
 import java.io.IOException;
 
 
@@ -44,7 +43,7 @@ class SimpleQueryConverter extends Spell
     try {
       Collection<Token> result = new HashSet<Token>();
       WhitespaceAnalyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_40);
-      TokenStream ts = analyzer.tokenStream("", new StringReader(origQuery));
+      TokenStream ts = analyzer.tokenStream("", origQuery);
       // TODO: support custom attributes
       CharTermAttribute termAtt = ts.addAttribute(CharTermAttribute.class);
       OffsetAttribute offsetAtt = ts.addAttribute(OffsetAttribute.class);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java Tue Jul 16 17:00:05 2013
@@ -357,9 +357,7 @@ public class DocumentBuilderTest extends
    */
   private static byte expectedNorm(final DefaultSimilarity sim,
                                    final int length, final float boost) {
-    
-    return sim.encodeNormValue(boost / ((float) Math.sqrt(length)));
-
+    return (byte) sim.encodeNormValue(boost / ((float) Math.sqrt(length)));
   }
     
 

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/SolrIndexSplitterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/SolrIndexSplitterTest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/SolrIndexSplitterTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/update/SolrIndexSplitterTest.java Tue Jul 16 17:00:05 2013
@@ -133,21 +133,18 @@ public class SolrIndexSplitterTest exten
 
     SolrCore core1 = null, core2 = null;
     try {
-      CoreDescriptor dcore1 = new CoreDescriptor(h.getCoreContainer(), "split1", h.getCore().getCoreDescriptor().getInstanceDir());
-      dcore1.setDataDir(indexDir1.getAbsolutePath());
-      dcore1.setSchemaName("schema12.xml");
-      
+      String instanceDir = h.getCore().getCoreDescriptor().getInstanceDir();
+
+      CoreDescriptor dcore1 = buildCoreDescriptor(h.getCoreContainer(), "split1", instanceDir)
+          .withDataDir(indexDir1.getAbsolutePath()).withSchema("schema12.xml").build();
       if (h.getCoreContainer().getZkController() != null) {
         h.getCoreContainer().preRegisterInZk(dcore1);
       }
-      
       core1 = h.getCoreContainer().create(dcore1);
       h.getCoreContainer().register(core1, false);
 
-      CoreDescriptor dcore2 = new CoreDescriptor(h.getCoreContainer(), "split2", h.getCore().getCoreDescriptor().getInstanceDir());
-      dcore2.setDataDir(indexDir2.getAbsolutePath());
-      dcore2.setSchemaName("schema12.xml");
-      
+      CoreDescriptor dcore2 = buildCoreDescriptor(h.getCoreContainer(), "split2", instanceDir)
+          .withDataDir(indexDir2.getAbsolutePath()).withSchema("schema12.xml").build();
       if (h.getCoreContainer().getZkController() != null) {
         h.getCoreContainer().preRegisterInZk(dcore2);
       }

Modified: lucene/dev/branches/lucene3069/solr/example/resources/log4j.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/example/resources/log4j.properties?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/example/resources/log4j.properties (original)
+++ lucene/dev/branches/lucene3069/solr/example/resources/log4j.properties Tue Jul 16 17:00:05 2013
@@ -1,4 +1,5 @@
 #  Logging level
+solr.log=logs/
 log4j.rootLogger=INFO, file, CONSOLE
 
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
@@ -12,8 +13,12 @@ log4j.appender.file.MaxFileSize=4MB
 log4j.appender.file.MaxBackupIndex=9
 
 #- File to log to and log format
-log4j.appender.file.File=logs/solr.log
+log4j.appender.file.File=${solr.log}/solr.log
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n
 
-log4j.logger.org.apache.zookeeper=WARN
\ No newline at end of file
+log4j.logger.org.apache.zookeeper=WARN
+log4j.logger.org.apache.hadoop=WARN
+
+# set to INFO to enable infostream log messages
+log4j.logger.org.apache.solr.update.LoggingInfoStream=OFF

Modified: lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/schema.xml?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/schema.xml (original)
+++ lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/schema.xml Tue Jul 16 17:00:05 2013
@@ -1031,8 +1031,9 @@
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" />
         <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>
-        <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory"/> -->
-        <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory"/> -->
+        <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> -->
+        <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> -->
+        <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->
       </analyzer>
     </fieldType>
     

Modified: lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/solrconfig.xml?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene3069/solr/example/solr/collection1/conf/solrconfig.xml Tue Jul 16 17:00:05 2013
@@ -184,7 +184,8 @@
          maxBufferedDocs sets a limit on the number of documents buffered
          before flushing.
          If both ramBufferSizeMB and maxBufferedDocs is set, then
-         Lucene will flush based on whichever limit is hit first.  -->
+         Lucene will flush based on whichever limit is hit first.
+         The default is 100 MB.  -->
     <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
     <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
 
@@ -304,10 +305,11 @@
          To aid in advanced debugging, Lucene provides an "InfoStream"
          of detailed information when indexing.
 
-         Setting The value to true will instruct the underlying Lucene
-         IndexWriter to write its debugging info the specified file
+         Setting the value to true will instruct the underlying Lucene
+         IndexWriter to write its info stream to solr's log. By default,
+         this is enabled here, and controlled through log4j.properties.
       -->
-     <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> --> 
+     <infoStream>true</infoStream>
   </indexConfig>
 
 
@@ -364,7 +366,7 @@
          have some sort of hard autoCommit to limit the log size.
       -->
      <autoCommit> 
-       <maxTime>15000</maxTime> 
+       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> 
        <openSearcher>false</openSearcher> 
      </autoCommit>
 
@@ -373,11 +375,10 @@
          but does not ensure that data is synced to disk.  This is
          faster and more near-realtime friendly than a hard commit.
       -->
-     <!--
-       <autoSoftCommit> 
-         <maxTime>1000</maxTime> 
-       </autoSoftCommit>
-      -->
+
+     <autoSoftCommit> 
+       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 
+     </autoSoftCommit>
 
     <!-- Update Related Event Listeners
          

Modified: lucene/dev/branches/lucene3069/solr/example/solr/solr.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/example/solr/solr.xml?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/example/solr/solr.xml (original)
+++ lucene/dev/branches/lucene3069/solr/example/solr/solr.xml Tue Jul 16 17:00:05 2013
@@ -33,6 +33,7 @@
     <int name="hostPort">${jetty.port:8983}</int>
     <str name="hostContext">${hostContext:solr}</str>
     <int name="zkClientTimeout">${zkClientTimeout:15000}</int>
+    <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
   </solrcloud>
 
   <shardHandlerFactory name="shardHandlerFactory"

Modified: lucene/dev/branches/lucene3069/solr/licenses/morfologik-fsa-LICENSE-BSD.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/licenses/morfologik-fsa-LICENSE-BSD.txt?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/licenses/morfologik-fsa-LICENSE-BSD.txt (original)
+++ lucene/dev/branches/lucene3069/solr/licenses/morfologik-fsa-LICENSE-BSD.txt Tue Jul 16 17:00:05 2013
@@ -1,6 +1,6 @@
 
 Copyright (c) 2006 Dawid Weiss
-Copyright (c) 2007-2012 Dawid Weiss, Marcin Miłkowski
+Copyright (c) 2007-2013 Dawid Weiss, Marcin Miłkowski
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, 
@@ -26,4 +26,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIA
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

Modified: lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-LICENSE-BSD.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-LICENSE-BSD.txt?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-LICENSE-BSD.txt (original)
+++ lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-LICENSE-BSD.txt Tue Jul 16 17:00:05 2013
@@ -1,62 +1,26 @@
 BSD-licensed dictionary of Polish (Morfologik)
 
-Copyright (c) 2012, Marcin Miłkowski
+Morfologik Polish dictionary.
+Version: 2.0 PoliMorf
+Copyright (c) 2013, Marcin Miłkowski
 All rights reserved.
 
-Redistribution and  use in  source and binary  forms, with  or without
-modification, are permitted provided that the following conditions are
-met:
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met: 
 
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
+1. Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer. 
+2. Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution. 
 
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the
-   distribution.
-
-THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS
-OR  IMPLIED WARRANTIES,  INCLUDING, BUT  NOT LIMITED  TO,  THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT  SHALL COPYRIGHT  HOLDERS OR  CONTRIBUTORS BE
-LIABLE FOR  ANY DIRECT,  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT LIMITED  TO, PROCUREMENT OF
-SUBSTITUTE  GOODS OR  SERVICES;  LOSS  OF USE,  DATA,  OR PROFITS;  OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF LIABILITY,
-WHETHER IN  CONTRACT, STRICT LIABILITY, OR  TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---
-
-BSD-licensed dictionary of Polish (SGJP)
-http://sgjp.pl/morfeusz/
-
-Copyright © 2011 Zygmunt Saloni, Włodzimierz Gruszczyński, 
-	    	 Marcin Woliński, Robert Wołosz
-
-All rights reserved.
-
-Redistribution and  use in  source and binary  forms, with  or without
-modification, are permitted provided that the following conditions are
-met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the
-   distribution.
-
-THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS
-OR  IMPLIED WARRANTIES,  INCLUDING, BUT  NOT LIMITED  TO,  THE IMPLIED
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT  SHALL COPYRIGHT  HOLDERS OR  CONTRIBUTORS BE
-LIABLE FOR  ANY DIRECT,  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT LIMITED  TO, PROCUREMENT OF
-SUBSTITUTE  GOODS OR  SERVICES;  LOSS  OF USE,  DATA,  OR PROFITS;  OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF LIABILITY,
-WHETHER IN  CONTRACT, STRICT LIABILITY, OR  TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Modified: lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-NOTICE.txt?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-NOTICE.txt (original)
+++ lucene/dev/branches/lucene3069/solr/licenses/morfologik-polish-NOTICE.txt Tue Jul 16 17:00:05 2013
@@ -1,6 +1,3 @@
 
-This product includes data from BSD-licensed dictionary of Polish (Morfologik)
-(http://morfologik.blogspot.com/)
-
-This product includes data from BSD-licensed dictionary of Polish (SGJP)
-(http://sgjp.pl/morfeusz/)
+This product includes data from BSD-licensed dictionary of Polish (Morfologik, PoliMorf)
+(http://morfologik.blogspot.com/)
\ No newline at end of file

Modified: lucene/dev/branches/lucene3069/solr/licenses/morfologik-stemming-LICENSE-BSD.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/licenses/morfologik-stemming-LICENSE-BSD.txt?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/licenses/morfologik-stemming-LICENSE-BSD.txt (original)
+++ lucene/dev/branches/lucene3069/solr/licenses/morfologik-stemming-LICENSE-BSD.txt Tue Jul 16 17:00:05 2013
@@ -1,6 +1,6 @@
 
 Copyright (c) 2006 Dawid Weiss
-Copyright (c) 2007-2012 Dawid Weiss, Marcin Miłkowski
+Copyright (c) 2007-2013 Dawid Weiss, Marcin Miłkowski
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, 
@@ -26,4 +26,4 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIA
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java Tue Jul 16 17:00:05 2013
@@ -91,6 +91,13 @@ public class CloudSolrServer extends Sol
       this.lbServer = new LBHttpSolrServer(myClient);
       this.updatesToLeaders = true;
   }
+  
+  public CloudSolrServer(String zkHost, boolean updatesToLeaders) throws MalformedURLException {
+    this.zkHost = zkHost;
+    this.myClient = HttpClientUtil.createClient(null);
+    this.lbServer = new LBHttpSolrServer(myClient);
+    this.updatesToLeaders = updatesToLeaders;
+}
 
   /**
    * @param zkHost The client endpoint of the zookeeper quorum containing the cloud state,
@@ -124,6 +131,11 @@ public class CloudSolrServer extends Sol
     this.defaultCollection = collection;
   }
 
+  /** Gets the default collection for request */
+  public String getDefaultCollection() {
+    return defaultCollection;
+  }
+
   /** Set the connect timeout to the zookeeper ensemble in ms */
   public void setZkConnectTimeout(int zkConnectTimeout) {
     this.zkConnectTimeout = zkConnectTimeout;
@@ -348,6 +360,10 @@ public class CloudSolrServer extends Sol
   public LBHttpSolrServer getLbServer() {
     return lbServer;
   }
+  
+  public boolean isUpdatesToLeaders() {
+    return updatesToLeaders;
+  }
 
   // for tests
   Map<String,List<String>> getUrlLists() {

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java Tue Jul 16 17:00:05 2013
@@ -658,7 +658,7 @@ public class HttpSolrServer extends Solr
    * status code that may have been returned by the remote server or a 
    * proxy along the way.
    */
-  protected static class RemoteSolrException extends SolrException {
+  public static class RemoteSolrException extends SolrException {
     /**
      * @param code Arbitrary HTTP status code
      * @param msg Exception Message

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java Tue Jul 16 17:00:05 2013
@@ -17,22 +17,22 @@
 
 package org.apache.solr.client.solrj.request;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Arrays;
-
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.CoreAdminResponse;
 import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.CoreAdminParams;
-import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.params.CoreAdminParams.CoreAdminAction;
+import org.apache.solr.common.params.ModifiableSolrParams;
+import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ContentStream;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
 /**
  * This class is experimental and subject to change.
  *
@@ -534,6 +534,7 @@ public class CoreAdminRequest extends So
     return req.process( server );
   }
 
+  @Deprecated
   public static CoreAdminResponse persist(String fileName, SolrServer server) throws SolrServerException, IOException 
   {
     CoreAdminRequest.Persist req = new CoreAdminRequest.Persist();

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java Tue Jul 16 17:00:05 2013
@@ -165,15 +165,18 @@ public class ClusterState implements JSO
     return Collections.unmodifiableSet(liveNodes);
   }
 
-  /**
-   * Get the slice/shardId for a core.
-   * @param coreNodeName in the form of nodeName_coreName (the name of the replica)
-   */
-  public String getShardId(String coreNodeName) {
-    //  System.out.println("###### getShardId("+coreNodeName+") in " + collectionStates);
+  public String getShardId(String baseUrl, String coreName) {
+    // System.out.println("###### getShardId(" + baseUrl + "," + coreName + ") in " + collectionStates);
     for (DocCollection coll : collectionStates.values()) {
       for (Slice slice : coll.getSlices()) {
-        if (slice.getReplicasMap().containsKey(coreNodeName)) return slice.getName();
+        for (Replica replica : slice.getReplicas()) {
+          // TODO: for really large clusters, we could 'index' on this
+          String rbaseUrl = replica.getStr(ZkStateReader.BASE_URL_PROP);
+          String rcore = replica.getStr(ZkStateReader.CORE_NAME_PROP);
+          if (baseUrl.equals(rbaseUrl) && coreName.equals(rcore)) {
+            return slice.getName();
+          }
+        }
       }
     }
     return null;

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Tue Jul 16 17:00:05 2013
@@ -508,6 +508,7 @@ public class ZkStateReader {
   
   public List<ZkCoreNodeProps> getReplicaProps(String collection,
       String shardId, String thisCoreNodeName, String coreName, String mustMatchStateFilter, String mustNotMatchStateFilter) {
+    assert thisCoreNodeName != null;
     ClusterState clusterState = this.clusterState;
     if (clusterState == null) {
       return null;
@@ -540,7 +541,7 @@ public class ZkStateReader {
       }
     }
     if (nodes.size() == 0) {
-      // no replicas - go local
+      // no replicas
       return null;
     }
 

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java Tue Jul 16 17:00:05 2013
@@ -28,7 +28,7 @@ public interface CollectionParams 
 
 
   public enum CollectionAction {
-    CREATE, DELETE, RELOAD, SYNCSHARD, CREATEALIAS, DELETEALIAS, SPLITSHARD;
+    CREATE, DELETE, RELOAD, SYNCSHARD, CREATEALIAS, DELETEALIAS, SPLITSHARD, DELETESHARD;
     
     public static CollectionAction get( String p )
     {

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java Tue Jul 16 17:00:05 2013
@@ -23,7 +23,7 @@ import java.util.Locale;
 /**
  * @since solr 1.3
  */
-public interface CoreAdminParams 
+public abstract class CoreAdminParams
 {
   /** What Core are we talking about **/
   public final static String CORE = "core";

Modified: lucene/dev/branches/lucene3069/solr/solrj/src/test-files/solrj/log4j.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/solrj/src/test-files/solrj/log4j.properties?rev=1503797&r1=1503796&r2=1503797&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/solrj/src/test-files/solrj/log4j.properties (original)
+++ lucene/dev/branches/lucene3069/solr/solrj/src/test-files/solrj/log4j.properties Tue Jul 16 17:00:05 2013
@@ -7,3 +7,4 @@ log4j.appender.CONSOLE.layout=org.apache
 log4j.appender.CONSOLE.layout.ConversionPattern=%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; %C; %m\n
 
 log4j.logger.org.apache.zookeeper=WARN
+log4j.logger.org.apache.hadoop=WARN