Return-Path: Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: (qmail 88699 invoked from network); 13 Jan 2011 02:11:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 02:11:22 -0000 Received: (qmail 13595 invoked by uid 500); 13 Jan 2011 02:11:21 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 13588 invoked by uid 99); 13 Jan 2011 02:11:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 02:11:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 02:11:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DD5422388C36; Thu, 13 Jan 2011 02:10:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1058390 [16/16] - in /lucene/dev/branches/bulkpostings: ./ dev-tools/ dev-tools/eclipse/ dev-tools/idea/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/ dev-tools/idea/lucene/contrib/ dev-tools/idea/lucene/cont... Date: Thu, 13 Jan 2011 02:09:56 -0000 To: commits@lucene.apache.org From: rmuir@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110113021003.DD5422388C36@eris.apache.org> Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java Thu Jan 13 02:09:33 2011 @@ -25,6 +25,7 @@ import org.apache.lucene.util.LuceneTest import org.apache.commons.io.IOUtils; import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.client.solrj.SolrJettyTestBase; import org.mortbay.jetty.Connector; import org.mortbay.jetty.Server; import org.mortbay.jetty.bio.SocketConnector; @@ -46,13 +47,13 @@ public class JettyWebappTest extends Luc public void setUp() throws Exception { super.setUp(); - System.setProperty("solr.solr.home", "../../../example/solr"); + System.setProperty("solr.solr.home", SolrJettyTestBase.EXAMPLE_HOME); File dataDir = new File(SolrTestCaseJ4.TEMP_DIR, getClass().getName() + "-" + System.currentTimeMillis()); dataDir.mkdirs(); System.setProperty("solr.data.dir", dataDir.getCanonicalPath()); - String path = "../../webapp/web"; + String path = SolrJettyTestBase.WEBAPP_HOME; server = new Server(port); // insecure: only use for tests!!!! Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java Thu Jan 13 02:09:33 2011 @@ -69,12 +69,12 @@ public class TestSolrProperties extends @Before public void setUp() throws Exception { super.setUp(); - System.setProperty("solr.solr.home", getSolrHome()); + File home = SolrTestCaseJ4.getFile(getSolrHome()); + System.setProperty("solr.solr.home", home.getAbsolutePath()); log.info("pwd: " + (new File(".")).getAbsolutePath()); - File home = new File(getSolrHome()); solrXml = new File(home, "solr.xml"); - cores = new CoreContainer(getSolrHome(), solrXml); + cores = new CoreContainer(home.getAbsolutePath(), solrXml); } @After Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java Thu Jan 13 02:09:33 2011 @@ -48,7 +48,7 @@ public class DocumentAnalysisResponseTes DocumentAnalysisResponse response = new DocumentAnalysisResponse() { @Override - protected List buildPhases(NamedList phaseNL) { + protected List buildPhases(NamedList>> phaseNL) { return phases; } }; Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java Thu Jan 13 02:09:33 2011 @@ -49,7 +49,7 @@ public class FieldAnalysisResponseTest e NamedList responseNL = buildResponse(); FieldAnalysisResponse response = new FieldAnalysisResponse() { @Override - protected List buildPhases(NamedList phaseNL) { + protected List buildPhases(NamedList>> phaseNL) { return phases; } }; Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java Thu Jan 13 02:09:33 2011 @@ -18,12 +18,16 @@ package org.apache.solr.client.solrj.response; import java.io.FileReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import junit.framework.Assert; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.client.solrj.impl.XMLResponseParser; import org.apache.solr.common.util.NamedList; +import org.apache.solr.core.SolrResourceLoader; import org.junit.Test; /** @@ -35,8 +39,9 @@ public class QueryResponseTest extends L @Test public void testDateFacets() throws Exception { XMLResponseParser parser = new XMLResponseParser(); - FileReader in = new FileReader("sampleDateFacetResponse.xml"); - assertTrue("in is null and it shouldn't be", in != null); + InputStream is = new SolrResourceLoader(null, null).openResource("sampleDateFacetResponse.xml"); + assertNotNull(is); + Reader in = new InputStreamReader(is, "UTF-8"); NamedList response = parser.processResponse(in); in.close(); Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/AbstractZkTestCase.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/AbstractZkTestCase.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/AbstractZkTestCase.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/AbstractZkTestCase.java Thu Jan 13 02:09:33 2011 @@ -94,7 +94,7 @@ public abstract class AbstractZkTestCase private static void putConfig(SolrZkClient zkConnection, String name) throws Exception { - zkConnection.setData("/configs/conf1/" + name, new File("solr" + zkConnection.setData("/configs/conf1/" + name, getFile("solr" + File.separator + "conf" + File.separator + name)); } Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Thu Jan 13 02:09:33 2011 @@ -19,6 +19,7 @@ package org.apache.solr.cloud; import java.net.MalformedURLException; +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.CloudSolrServer; import org.apache.solr.client.solrj.response.QueryResponse; @@ -59,7 +60,7 @@ public class BasicDistributedZkTest exte @BeforeClass public static void beforeClass() throws Exception { - + System.setProperty("solr.solr.home", SolrTestCaseJ4.TEST_HOME); } @Override Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java Thu Jan 13 02:09:33 2011 @@ -188,7 +188,7 @@ public class ZkControllerTest extends So zkController = new ZkController(server.getZkAddress(), TIMEOUT, 1000, "localhost", "8983", "/solr"); - zkController.uploadToZK(new File("solr/conf"), + zkController.uploadToZK(getFile("solr/conf"), ZkController.CONFIGS_ZKNODE + "/config1"); if (DEBUG) { Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/common/util/ContentStreamTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/common/util/ContentStreamTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/common/util/ContentStreamTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/common/util/ContentStreamTest.java Thu Jan 13 02:09:33 2011 @@ -20,15 +20,18 @@ package org.apache.solr.common.util; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; +import java.net.ConnectException; import java.net.URL; import org.apache.commons.io.IOUtils; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.util.ContentStreamBase; +import org.apache.solr.core.SolrResourceLoader; /** */ @@ -45,8 +48,12 @@ public class ContentStreamTest extends L public void testFileStream() throws IOException { - File file = new File( "README" ); - assertTrue( file.exists() ); // "make sure you are running from: solr\src\test\test-files" + InputStream is = new SolrResourceLoader(null, null).openResource( "README" ); + assertNotNull( is ); + File file = new File(TEMP_DIR, "README"); + FileOutputStream os = new FileOutputStream(file); + IOUtils.copy(is, os); + os.close(); ContentStreamBase stream = new ContentStreamBase.FileStream( file ); assertEquals( file.length(), stream.getSize().intValue() ); @@ -59,12 +66,16 @@ public class ContentStreamTest extends L { String content = null; URL url = new URL( "http://svn.apache.org/repos/asf/lucene/dev/trunk/" ); - InputStream in = url.openStream(); + InputStream in = null; try { + in = url.openStream(); content = IOUtils.toString( in ); - } - finally { - IOUtils.closeQuietly(in); + } catch (ConnectException ex) { + assumeNoException("Unable to connect to " + url + " to run the test.", ex); + }finally { + if (in != null) { + IOUtils.closeQuietly(in); + } } assertTrue( content.length() > 10 ); // found something... Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java Thu Jan 13 02:09:33 2011 @@ -70,7 +70,7 @@ public class TestJmxMonitoredMap extends throw e; } String url = "service:jmx:rmi:///jndi/rmi://:" + port + "/solrjmx"; - JmxConfiguration config = new JmxConfiguration(true, null, url); + JmxConfiguration config = new JmxConfiguration(true, null, url, null); monitoredMap = new JmxMonitoredMap(null, config); JMXServiceURL u = new JMXServiceURL(url); connector = JMXConnectorFactory.connect(u); Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestXIncludeConfig.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestXIncludeConfig.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestXIncludeConfig.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/core/TestXIncludeConfig.java Thu Jan 13 02:09:33 2011 @@ -1,5 +1,8 @@ package org.apache.solr.core; +import java.io.File; + +import org.apache.commons.io.FileUtils; import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.request.SolrRequestHandler; @@ -24,7 +27,9 @@ public class TestXIncludeConfig extends @Override public void setUp() throws Exception { - + File dest = new File("solrconfig-reqHandler.incl"); + dest.deleteOnExit(); + FileUtils.copyFile(getFile("solr/conf/solrconfig-reqHandler.incl"), dest); supports = true; javax.xml.parsers.DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/JsonLoaderTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/JsonLoaderTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/JsonLoaderTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/JsonLoaderTest.java Thu Jan 13 02:09:33 2011 @@ -23,16 +23,23 @@ import java.util.List; import org.apache.noggit.JSONParser; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; +import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.update.AddUpdateCommand; import org.apache.solr.update.CommitUpdateCommand; import org.apache.solr.update.DeleteUpdateCommand; import org.apache.solr.update.RollbackUpdateCommand; import org.apache.solr.update.processor.UpdateRequestProcessor; +import org.junit.BeforeClass; -public class JsonLoaderTest extends LuceneTestCase { - +public class JsonLoaderTest extends SolrTestCaseJ4 { + @BeforeClass + public static void beforeTests() throws Exception { + initCore("solrconfig.xml","schema.xml"); + } + static String input = ("{\n" + "\n" + "'add': {\n" + @@ -73,12 +80,13 @@ public class JsonLoaderTest extends Luce public void testParsing() throws Exception { + SolrQueryRequest req = req(); Reader reader = new StringReader(input); BufferingRequestProcessor p = new BufferingRequestProcessor(null); JsonLoader loader = new JsonLoader( p ); - loader.processUpdate( p, new JSONParser(reader) ); + loader.processUpdate(req, p, new JSONParser(reader) ); assertEquals( 2, p.addCommands.size() ); @@ -122,6 +130,8 @@ public class JsonLoaderTest extends Luce // ROLLBACK COMMANDS assertEquals( 1, p.rollbackCommands.size() ); + + req.close(); } } Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java Thu Jan 13 02:09:33 2011 @@ -250,14 +250,14 @@ public class TestReplicationHandler exte masterClient.commit(); //change the schema on master - copyFile(new File(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema.xml")); + copyFile(getFile(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema.xml")); masterJetty.stop(); masterJetty = createJetty(master); masterClient = createNewSolrServer(masterJetty.getLocalPort()); - copyFile(new File(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); slaveJetty.stop(); slaveJetty = createJetty(slave); @@ -349,7 +349,7 @@ public class TestReplicationHandler exte public void testSnapPullWithMasterUrl() throws Exception { //change solrconfig on slave //this has no entry for pollinginterval - copyFile(new File(CONF_DIR + "solrconfig-slave1.xml"), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(CONF_DIR + "solrconfig-slave1.xml"), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); slaveJetty.stop(); slaveJetty = createJetty(slave); slaveClient = createNewSolrServer(slaveJetty.getLocalPort()); @@ -386,7 +386,7 @@ public class TestReplicationHandler exte // NOTE: at this point, the slave is not polling any more // restore it. - copyFile(new File(CONF_DIR + "solrconfig-slave.xml"), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(CONF_DIR + "solrconfig-slave.xml"), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); slaveJetty.stop(); slaveJetty = createJetty(slave); slaveClient = createNewSolrServer(slaveJetty.getLocalPort()); @@ -410,7 +410,7 @@ public class TestReplicationHandler exte assertEquals(nDocs, masterQueryResult.getNumFound()); //change solrconfig having 'replicateAfter startup' option on master - copyFile(new File(CONF_DIR + "solrconfig-master2.xml"), + copyFile(getFile(CONF_DIR + "solrconfig-master2.xml"), new File(master.getConfDir(), "solrconfig.xml")); masterJetty.stop(); @@ -418,7 +418,7 @@ public class TestReplicationHandler exte masterJetty = createJetty(master); masterClient = createNewSolrServer(masterJetty.getLocalPort()); - copyFile(new File(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); //start slave slaveJetty = createJetty(slave); @@ -435,11 +435,11 @@ public class TestReplicationHandler exte // NOTE: the master only replicates after startup now! // revert that change. - copyFile(new File(CONF_DIR + "solrconfig-master.xml"), new File(master.getConfDir(), "solrconfig.xml")); + copyFile(getFile(CONF_DIR + "solrconfig-master.xml"), new File(master.getConfDir(), "solrconfig.xml")); masterJetty.stop(); masterJetty = createJetty(master); masterClient = createNewSolrServer(masterJetty.getLocalPort()); - copyFile(new File(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); //start slave slaveJetty.stop(); slaveJetty = createJetty(slave); @@ -477,20 +477,20 @@ public class TestReplicationHandler exte masterClient.commit(); //change solrconfig on master - copyFile(new File(CONF_DIR + "solrconfig-master1.xml"), new File(master.getConfDir(), "solrconfig.xml")); + copyFile(getFile(CONF_DIR + "solrconfig-master1.xml"), new File(master.getConfDir(), "solrconfig.xml")); //change schema on master - copyFile(new File(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema.xml")); + copyFile(getFile(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema.xml")); //keep a copy of the new schema - copyFile(new File(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema-replication2.xml")); + copyFile(getFile(CONF_DIR + "schema-replication2.xml"), new File(master.getConfDir(), "schema-replication2.xml")); masterJetty.stop(); masterJetty = createJetty(master); masterClient = createNewSolrServer(masterJetty.getLocalPort()); - copyFile(new File(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); + copyFile(getFile(SLAVE_CONFIG), new File(slave.getConfDir(), "solrconfig.xml"), masterJetty.getLocalPort()); slaveJetty.stop(); slaveJetty = createJetty(slave); @@ -522,7 +522,7 @@ public class TestReplicationHandler exte public void testBackup() throws Exception { masterJetty.stop(); - copyFile(new File(CONF_DIR + "solrconfig-master1.xml"), new File(master.getConfDir(), "solrconfig.xml")); + copyFile(getFile(CONF_DIR + "solrconfig-master1.xml"), new File(master.getConfDir(), "solrconfig.xml")); masterJetty = createJetty(master); masterClient = createNewSolrServer(masterJetty.getLocalPort()); @@ -708,9 +708,9 @@ public class TestReplicationHandler exte confDir.mkdirs(); File f = new File(confDir, "solrconfig.xml"); - copyFile(new File(getSolrConfigFile()), f, masterPort); + copyFile(getFile(getSolrConfigFile()), f, masterPort); f = new File(confDir, "schema.xml"); - copyFile(new File(getSchemaFile()), f); + copyFile(getFile(getSchemaFile()), f); } public void tearDown() throws Exception { Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java Thu Jan 13 02:09:33 2011 @@ -20,6 +20,7 @@ package org.apache.solr.highlight; import java.util.HashMap; import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.handler.component.HighlightComponent; import org.apache.solr.util.TestHarness; import org.junit.BeforeClass; import org.junit.Test; @@ -33,7 +34,7 @@ public class FastVectorHighlighterTest e @Test public void testConfig(){ - SolrHighlighter highlighter = h.getCore().getHighlighter(); + SolrHighlighter highlighter = HighlightComponent.getHighlighter(h.getCore()); // Make sure we loaded the one fragListBuilder SolrFragListBuilder solrFlbNull = highlighter.fragListBuilders.get( null ); Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterConfigTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterConfigTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterConfigTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterConfigTest.java Thu Jan 13 02:09:33 2011 @@ -16,6 +16,7 @@ */ package org.apache.solr.highlight; +import org.apache.solr.handler.component.HighlightComponent; import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.util.TestHarness; @@ -42,7 +43,7 @@ public class HighlighterConfigTest exten public void testConfig() { - SolrHighlighter highlighter = h.getCore().getHighlighter(); + SolrHighlighter highlighter = HighlightComponent.getHighlighter(h.getCore()); log.info( "highlighter" ); assertTrue( highlighter instanceof DummyHighlighter ); Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterTest.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterTest.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/highlight/HighlighterTest.java Thu Jan 13 02:09:33 2011 @@ -21,6 +21,7 @@ import org.apache.lucene.analysis.Analyz import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.handler.component.HighlightComponent; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.util.*; import org.apache.solr.common.params.HighlightParams; @@ -62,7 +63,7 @@ public class HighlighterTest extends Sol @Test public void testConfig() { - SolrHighlighter highlighter = h.getCore().getHighlighter(); + SolrHighlighter highlighter = HighlightComponent.getHighlighter(h.getCore()); // Make sure we loaded the one formatter SolrFormatter fmt1 = highlighter.formatters.get( null ); @@ -697,7 +698,7 @@ public class HighlighterTest extends Sol 10, args); SolrQueryRequest request = lrf.makeRequest("test"); - SolrHighlighter highlighter = request.getCore().getHighlighter(); + SolrHighlighter highlighter = HighlightComponent.getHighlighter(h.getCore()); List highlightFieldNames = Arrays.asList(highlighter .getHighlightFields(null, request, new String[] {})); assertTrue("Expected to highlight on field \"title\"", highlightFieldNames @@ -711,7 +712,7 @@ public class HighlighterTest extends Sol args.put("hl.fl", "foo_*"); lrf = h.getRequestFactory("standard", 0, 10, args); request = lrf.makeRequest("test"); - highlighter = request.getCore().getHighlighter(); + highlighter = HighlightComponent.getHighlighter(h.getCore()); highlightFieldNames = Arrays.asList(highlighter.getHighlightFields(null, request, new String[] {})); assertEquals("Expected one field to highlight on", 1, highlightFieldNames Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/TestBinaryField.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/TestBinaryField.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/TestBinaryField.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/schema/TestBinaryField.java Thu Jan 13 02:09:33 2011 @@ -25,10 +25,13 @@ import org.apache.solr.client.solrj.resp import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.core.SolrResourceLoader; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; import java.nio.ByteBuffer; import java.io.File; +import java.io.FileOutputStream; import java.util.List; public class TestBinaryField extends LuceneTestCase { @@ -53,12 +56,17 @@ public class TestBinaryField extends Luc dataDir.mkdirs(); confDir.mkdirs(); + SolrResourceLoader loader = new SolrResourceLoader(null, null); File f = new File(confDir, "solrconfig.xml"); - String fname = "." + File.separator + "solr" + File.separator + "conf" + File.separator + "solrconfig-slave1.xml"; - FileUtils.copyFile(new File(fname), f); + String fname = "solr/conf/solrconfig-slave1.xml"; + FileOutputStream out = new FileOutputStream(f); + IOUtils.copy(loader.openResource(fname), out); + out.close(); f = new File(confDir, "schema.xml"); - fname = "." + File.separator + "solr" + File.separator + "conf" + File.separator + "schema-binaryfield.xml"; - FileUtils.copyFile(new File(fname), f); + fname = "solr/conf/schema-binaryfield.xml"; + out = new FileOutputStream(f); + IOUtils.copy(loader.openResource(fname), out); + out.close(); System.setProperty("solr.solr.home", homeDir.getAbsolutePath()); System.setProperty("solr.data.dir", dataDir.getAbsolutePath()); System.setProperty("solr.test.sys.prop1", "propone"); Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestDocSet.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestDocSet.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestDocSet.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestDocSet.java Thu Jan 13 02:09:33 2011 @@ -24,8 +24,11 @@ import java.io.IOException; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.OpenBitSet; import org.apache.lucene.util.OpenBitSetIterator; +import org.apache.lucene.util.ReaderUtil; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.FilterIndexReader; +import org.apache.lucene.index.IndexReader.AtomicReaderContext; +import org.apache.lucene.index.IndexReader.ReaderContext; import org.apache.lucene.index.MultiReader; import org.apache.lucene.search.Filter; import org.apache.lucene.search.DocIdSet; @@ -404,6 +407,7 @@ public class TestDocSet extends LuceneTe } public void doFilterTest(SolrIndexReader reader) throws IOException { + ReaderContext topLevelContext = reader.getTopReaderContext(); OpenBitSet bs = getRandomSet(reader.maxDoc(), rand.nextInt(reader.maxDoc()+1)); DocSet a = new BitDocSet(bs); DocSet b = getIntDocSet(bs); @@ -411,24 +415,30 @@ public class TestDocSet extends LuceneTe Filter fa = a.getTopFilter(); Filter fb = b.getTopFilter(); + /*** top level filters are no longer supported // test top-level - DocIdSet da = fa.getDocIdSet(reader); - DocIdSet db = fb.getDocIdSet(reader); + DocIdSet da = fa.getDocIdSet(topLevelContext); + DocIdSet db = fb.getDocIdSet(topLevelContext); doTestIteratorEqual(da, db); + ***/ + + DocIdSet da; + DocIdSet db; // first test in-sequence sub readers - for (SolrIndexReader sir : reader.getLeafReaders()) { - da = fa.getDocIdSet(sir); - db = fb.getDocIdSet(sir); + for (AtomicReaderContext readerContext : ReaderUtil.leaves(topLevelContext)) { + da = fa.getDocIdSet(readerContext); + db = fb.getDocIdSet(readerContext); doTestIteratorEqual(da, db); } - int nReaders = reader.getLeafReaders().length; + AtomicReaderContext[] leaves = ReaderUtil.leaves(topLevelContext); + int nReaders = leaves.length; // now test out-of-sequence sub readers for (int i=0; i args = new HashMap(); - args.put( CommonParams.Q, "id:A" ); - args.put( "indent", "true" ); - SolrQueryRequest req = new LocalSolrQueryRequest( h.getCore(), new MapSolrParams( args) ); - assertQ("\"A\" should not be found.", req - ,"//*[@numFound='0']" - ); + // No id should fail + ignoreException("id"); + assertFailedU(adoc("text","foo")); + resetExceptionIgnores(); } - @Test - public void testAddCommit() throws Exception { - addSimpleDoc("A"); - // commit "A" - SolrCore core = h.getCore(); - UpdateHandler updater = core.getUpdateHandler(); - CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false); - cmtCmd.waitSearcher = true; - updater.commit(cmtCmd); - - // search - "A" should be found. - Map args = new HashMap(); - args.put( CommonParams.Q, "id:A" ); - args.put( "indent", "true" ); - SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) ); - assertQ("\"A\" should be found.", req - ,"//*[@numFound='1']" - ,"//result/doc[1]/str[@name='id'][.='A']" - ); - } @Test - public void testDeleteCommit() throws Exception { - addSimpleDoc("A"); - addSimpleDoc("B"); + public void testBasics() throws Exception { + assertU(adoc("id","5")); - // commit "A", "B" - SolrCore core = h.getCore(); - UpdateHandler updater = core.getUpdateHandler(); - CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false); - cmtCmd.waitSearcher = true; - updater.commit(cmtCmd); + // search - not committed - "5" should not be found. + assertQ(req("q","id:5"), "//*[@numFound='0']"); - // search - "A","B" should be found. - Map args = new HashMap(); - args.put( CommonParams.Q, "id:A OR id:B" ); - args.put( "indent", "true" ); - SolrQueryRequest req = new LocalSolrQueryRequest( core, new MapSolrParams( args) ); - assertQ("\"A\" and \"B\" should be found.", req - ,"//*[@numFound='2']" - ,"//result/doc[1]/str[@name='id'][.='A']" - ,"//result/doc[2]/str[@name='id'][.='B']" - ); + assertU(commit()); - // delete "B" - deleteSimpleDoc("B"); + // now it should be there + assertQ(req("q","id:5"), "//*[@numFound='1']"); - // search - "A","B" should be found. - assertQ("\"A\" and \"B\" should be found.", req - ,"//*[@numFound='2']" - ,"//result/doc[1]/str[@name='id'][.='A']" - ,"//result/doc[2]/str[@name='id'][.='B']" - ); - - // commit - updater.commit(cmtCmd); + // now delete it + assertU(delI("5")); + + // not committed yet + assertQ(req("q","id:5"), "//*[@numFound='1']"); + + assertU(commit()); - // search - "B" should not be found. - assertQ("\"B\" should not be found.", req - ,"//*[@numFound='1']" - ,"//result/doc[1]/str[@name='id'][.='A']" - ); + // should be gone + assertQ(req("q","id:5"), "//*[@numFound='0']"); + } + @Test public void testAddRollback() throws Exception { // re-init the core deleteCore(); initCore("solrconfig.xml", "schema12.xml"); - addSimpleDoc("A"); + assertU(adoc("id","A")); // commit "A" SolrCore core = h.getCore(); UpdateHandler updater = core.getUpdateHandler(); assertTrue( updater instanceof DirectUpdateHandler2 ); DirectUpdateHandler2 duh2 = (DirectUpdateHandler2)updater; - CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false); + SolrQueryRequest ureq = req(); + CommitUpdateCommand cmtCmd = new CommitUpdateCommand(ureq, false); cmtCmd.waitSearcher = true; assertEquals( 1, duh2.addCommands.get() ); assertEquals( 1, duh2.addCommandsCumulative.get() ); @@ -193,11 +119,13 @@ public class DirectUpdateHandlerTest ext assertEquals( 0, duh2.addCommands.get() ); assertEquals( 1, duh2.addCommandsCumulative.get() ); assertEquals( 1, duh2.commitCommands.get() ); + ureq.close(); - addSimpleDoc("B"); + assertU(adoc("id","B")); // rollback "B" - RollbackUpdateCommand rbkCmd = new RollbackUpdateCommand(); + ureq = req(); + RollbackUpdateCommand rbkCmd = new RollbackUpdateCommand(ureq); assertEquals( 1, duh2.addCommands.get() ); assertEquals( 2, duh2.addCommandsCumulative.get() ); assertEquals( 0, duh2.rollbackCommands.get() ); @@ -205,6 +133,7 @@ public class DirectUpdateHandlerTest ext assertEquals( 0, duh2.addCommands.get() ); assertEquals( 1, duh2.addCommandsCumulative.get() ); assertEquals( 1, duh2.rollbackCommands.get() ); + ureq.close(); // search - "B" should not be found. Map args = new HashMap(); @@ -218,7 +147,7 @@ public class DirectUpdateHandlerTest ext // Add a doc after the rollback to make sure we can continue to add/delete documents // after a rollback as normal - addSimpleDoc("ZZZ"); + assertU(adoc("id","ZZZ")); assertU(commit()); assertQ("\"ZZZ\" must be found.", req("q", "id:ZZZ") ,"//*[@numFound='1']" @@ -232,15 +161,16 @@ public class DirectUpdateHandlerTest ext deleteCore(); initCore("solrconfig.xml", "schema12.xml"); - addSimpleDoc("A"); - addSimpleDoc("B"); + assertU(adoc("id","A")); + assertU(adoc("id","B")); // commit "A", "B" SolrCore core = h.getCore(); UpdateHandler updater = core.getUpdateHandler(); assertTrue( updater instanceof DirectUpdateHandler2 ); DirectUpdateHandler2 duh2 = (DirectUpdateHandler2)updater; - CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false); + SolrQueryRequest ureq = req(); + CommitUpdateCommand cmtCmd = new CommitUpdateCommand(ureq, false); cmtCmd.waitSearcher = true; assertEquals( 2, duh2.addCommands.get() ); assertEquals( 2, duh2.addCommandsCumulative.get() ); @@ -249,6 +179,7 @@ public class DirectUpdateHandlerTest ext assertEquals( 0, duh2.addCommands.get() ); assertEquals( 2, duh2.addCommandsCumulative.get() ); assertEquals( 1, duh2.commitCommands.get() ); + ureq.close(); // search - "A","B" should be found. Map args = new HashMap(); @@ -262,8 +193,8 @@ public class DirectUpdateHandlerTest ext ); // delete "B" - deleteSimpleDoc("B"); - + assertU(delI("B")); + // search - "A","B" should be found. assertQ("\"A\" and \"B\" should be found.", req ,"//*[@numFound='2']" @@ -272,11 +203,13 @@ public class DirectUpdateHandlerTest ext ); // rollback "B" - RollbackUpdateCommand rbkCmd = new RollbackUpdateCommand(); + ureq = req(); + RollbackUpdateCommand rbkCmd = new RollbackUpdateCommand(ureq); assertEquals( 1, duh2.deleteByIdCommands.get() ); assertEquals( 1, duh2.deleteByIdCommandsCumulative.get() ); assertEquals( 0, duh2.rollbackCommands.get() ); updater.rollback(rbkCmd); + ureq.close(); assertEquals( 0, duh2.deleteByIdCommands.get() ); assertEquals( 0, duh2.deleteByIdCommandsCumulative.get() ); assertEquals( 1, duh2.rollbackCommands.get() ); @@ -290,7 +223,7 @@ public class DirectUpdateHandlerTest ext // Add a doc after the rollback to make sure we can continue to add/delete documents // after a rollback as normal - addSimpleDoc("ZZZ"); + assertU(adoc("id","ZZZ")); assertU(commit()); assertQ("\"ZZZ\" must be found.", req("q", "id:ZZZ") ,"//*[@numFound='1']" @@ -312,7 +245,7 @@ public class DirectUpdateHandlerTest ext SolrQueryRequest sr = req("q","foo"); SolrIndexReader r = sr.getSearcher().getReader(); assertTrue(r.maxDoc() > r.numDocs()); // should have deletions - assertTrue(r.getLeafReaders().length > 1); // more than 1 segment + assertFalse(r.getTopReaderContext().isAtomic); // more than 1 segment sr.close(); assertU(commit("expungeDeletes","true")); @@ -321,32 +254,10 @@ public class DirectUpdateHandlerTest ext r = sr.getSearcher().getReader(); assertEquals(r.maxDoc(), r.numDocs()); // no deletions assertEquals(4,r.maxDoc()); // no dups - assertTrue(r.getLeafReaders().length > 1); // still more than 1 segment + assertFalse(r.getTopReaderContext().isAtomic); //still more than 1 segment sr.close(); } - private void addSimpleDoc(String id) throws Exception { - SolrCore core = h.getCore(); - - UpdateHandler updater = core.getUpdateHandler(); - - AddUpdateCommand cmd = new AddUpdateCommand(); - - // Add a document - cmd.doc = new Document(); - cmd.doc.add( new Field( "id", id, Store.YES, Index.NOT_ANALYZED ) ); - updater.addDoc( cmd ); - } - - private void deleteSimpleDoc(String id) throws Exception { - SolrCore core = h.getCore(); - - UpdateHandler updater = core.getUpdateHandler(); - - // Delete the document - DeleteUpdateCommand cmd = new DeleteUpdateCommand(); - cmd.id = id; - - updater.delete(cmd); - } + + } Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/TestIndexingPerformance.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/TestIndexingPerformance.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/TestIndexingPerformance.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/TestIndexingPerformance.java Thu Jan 13 02:09:33 2011 @@ -19,6 +19,7 @@ package org.apache.solr.update; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; +import org.apache.lucene.document.Fieldable; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.IndexSchema; import org.apache.solr.util.AbstractSolrTestCase; @@ -87,7 +88,7 @@ public class TestIndexingPerformance ext long start = System.currentTimeMillis(); - AddUpdateCommand add = new AddUpdateCommand(); + AddUpdateCommand add = new AddUpdateCommand(req); Field idField=null; @@ -99,7 +100,7 @@ public class TestIndexingPerformance ext for (int j=0; jinstanceDir: The solr instance directory. If null, it will check the standard - * places first (JNDI,properties,"solr" directory) - * - * dataDir: where the index is stored. - * - * loggingPath: Path to a java.util.logging.config.file. If the path represents - * an absolute path or is relative to the CWD, it will use that. Next it will try a path - * relative to the instanceDir. If none of these files exist, it will error. - */ - public DirectSolrConnection( String instanceDir, String dataDir, String loggingPath ) - { - // If a loggingPath is specified, try using that (this needs to happen first) - if( loggingPath != null ) { - File loggingConfig = new File( loggingPath ); - if( !loggingConfig.exists() && instanceDir != null ) { - loggingConfig = new File( new File(instanceDir), loggingPath ); - } - if( loggingConfig.exists() ) { - System.setProperty("java.util.logging.config.file", loggingConfig.getAbsolutePath() ); - } - else { - throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "can not find logging file: "+loggingConfig ); - } - } - - if( instanceDir == null ) { - instanceDir = SolrResourceLoader.locateInstanceDir(); - } - - // Initialize - try { - CoreContainer cores = new CoreContainer(new SolrResourceLoader(instanceDir)); - SolrConfig solrConfig = new SolrConfig(instanceDir, SolrConfig.DEFAULT_CONF_FILE, null); - CoreDescriptor dcore = new CoreDescriptor(cores, "", solrConfig.getResourceLoader().getInstanceDir()); - IndexSchema indexSchema = new IndexSchema(solrConfig, instanceDir+"/conf/schema.xml", null); - core = new SolrCore( null, dataDir, solrConfig, indexSchema, dcore); - cores.register("", core, false); - parser = new SolrRequestParsers( solrConfig ); - } - catch (Exception ee) { - throw new RuntimeException(ee); - } - } /** Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/SolrDispatchFilter.java Thu Jan 13 02:09:33 2011 @@ -81,7 +81,6 @@ public class SolrDispatchFilter implemen try { // web.xml configuration this.pathPrefix = config.getInitParameter( "path-prefix" ); - init.setSolrConfigFilename(config.getInitParameter("solrconfig-filename")); this.cores = init.initialize(); abortOnConfigurationError = init.isAbortOnConfigurationError(); Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/web/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/web/WEB-INF/web.xml?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/web/WEB-INF/web.xml (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/web/WEB-INF/web.xml Thu Jan 13 02:09:33 2011 @@ -83,62 +83,16 @@ /* - - - - SolrServer - Solr - Solr Server - org.apache.solr.servlet.SolrServlet - 1 - - - - SolrUpdate - SolrUpdate - Solr Update Handler - org.apache.solr.servlet.SolrUpdateServlet - 2 - - Logging org.apache.solr.servlet.LogLevelSelection - - - ping - /admin/ping.jsp - - - - SolrServer - /select/* - - - - SolrUpdate - /update/* - - Logging /admin/logging - - - ping - /admin/ping - - - - - Logging - /admin/logging.jsp - - .xsl Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/_info.jsp URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/_info.jsp?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/_info.jsp (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/_info.jsp Thu Jan 13 02:09:33 2011 @@ -63,7 +63,7 @@ isEnabled = new File(enabledFile).exists(); } - String collectionName = schema!=null ? schema.getName():"unknown"; + String collectionName = schema!=null ? schema.getSchemaName():"unknown"; String defaultSearch = ""; { @@ -114,7 +114,7 @@ } String cwd=System.getProperty("user.dir"); - String solrHome= solrConfig.getInstanceDir(); + String solrHome= solrConfig.getResourceLoader().getInstanceDir(); boolean cachingEnabled = !solrConfig.getHttpCachingConfig().isNever304(); %> Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/index.jsp URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/index.jsp?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/index.jsp (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/index.jsp Thu Jan 13 02:09:33 2011 @@ -97,7 +97,7 @@ <% // a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML - out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) ); + out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents(core, "admin-extra.html" ) ); %>

Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/registry.jsp URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/registry.jsp?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/registry.jsp (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/registry.jsp Thu Jan 13 02:09:33 2011 @@ -16,7 +16,6 @@ limitations under the License. --%> <%@ page import="org.apache.solr.core.SolrInfoMBean, - org.apache.solr.core.SolrInfoRegistry, java.net.URL, java.util.Date, java.util.Map"%> Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/stats.jsp URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/stats.jsp?rev=1058390&r1=1058389&r2=1058390&view=diff ============================================================================== --- lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/stats.jsp (original) +++ lucene/dev/branches/bulkpostings/solr/src/webapp/web/admin/stats.jsp Thu Jan 13 02:09:33 2011 @@ -16,7 +16,6 @@ limitations under the License. --%> <%@ page import="org.apache.solr.core.SolrInfoMBean, - org.apache.solr.core.SolrInfoRegistry, org.apache.solr.common.util.NamedList, java.util.Date, java.util.Map"%>