lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
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 GMT
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<AnalysisPhase> buildPhases(NamedList<Object> phaseNL) {
+      protected List<AnalysisPhase> buildPhases(NamedList<List<NamedList<Object>>> 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<AnalysisPhase> buildPhases(NamedList<Object> phaseNL) {
+      protected List<AnalysisPhase> buildPhases(NamedList<List<NamedList<Object>>> 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<Object> 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<String, SolrInfoMBean>(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<String> 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<nReaders; i++) {
-      SolrIndexReader sir = reader.getLeafReaders()[rand.nextInt(nReaders)];
-      da = fa.getDocIdSet(sir);
-      db = fb.getDocIdSet(sir);
+      AtomicReaderContext readerContext = leaves[rand.nextInt(nReaders)];
+      da = fa.getDocIdSet(readerContext);
+      db = fb.getDocIdSet(readerContext);
       doTestIteratorEqual(da, db);
     }
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestIndexSearcher.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestIndexSearcher.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestIndexSearcher.java Thu Jan 13 02:09:33 2011
@@ -36,7 +36,7 @@ public class TestIndexSearcher extends S
   private String getStringVal(SolrQueryRequest sqr, String field, int doc) throws IOException {
     SchemaField sf = sqr.getSchema().getField(field);
     ValueSource vs = sf.getType().getValueSource(sf, null);
-    Map context = ValueSource.newContext();
+    Map context = ValueSource.newContext(sqr.getSearcher());
     vs.createWeight(context, sqr.getSearcher());
     SolrIndexReader sr = sqr.getSearcher().getReader();
     int idx = SolrIndexReader.readerIndex(doc, sr.getLeafOffsets());

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSearchPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSearchPerf.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSearchPerf.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSearchPerf.java Thu Jan 13 02:09:33 2011
@@ -111,7 +111,7 @@ public class TestSearchPerf extends Abst
         doc.addField("t10_100_ws", sb.toString());
       }
 
-      AddUpdateCommand cmd = new AddUpdateCommand();
+      AddUpdateCommand cmd = new AddUpdateCommand(req);
       cmd.solrDoc = doc;
       processor.processAdd(cmd);
     }

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSort.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSort.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/TestSort.java Thu Jan 13 02:09:33 2011
@@ -21,6 +21,7 @@ import org.apache.lucene.analysis.core.S
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.IndexReader.AtomicReaderContext;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.search.*;
@@ -106,8 +107,8 @@ public class TestSort extends AbstractSo
       for (int i=0; i<qiter; i++) {
         Filter filt = new Filter() {
           @Override
-          public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
-            return randSet(reader.maxDoc());
+          public DocIdSet getDocIdSet(AtomicReaderContext context) throws IOException {
+            return randSet(context.reader.maxDoc());
           }
         };
 

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java Thu Jan 13 02:09:33 2011
@@ -17,6 +17,7 @@
 
 package org.apache.solr.search.function;
 
+import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.search.DefaultSimilarity;
 import org.apache.lucene.search.FieldCache;
 import org.apache.lucene.search.Similarity;
@@ -294,8 +295,11 @@ public class TestFunctionQuery extends S
         "//float[@name='score']='" + similarity.idf(3,6)  + "'");
     assertQ(req("fl","*,score","q", "{!func}tf(a_t,cow)", "fq","id:6"),
         "//float[@name='score']='" + similarity.tf(5)  + "'");
+    FieldInvertState state = new FieldInvertState();
+    state.setBoost(1.0f);
+    state.setLength(4);
     assertQ(req("fl","*,score","q", "{!func}norm(a_t)", "fq","id:2"),
-        "//float[@name='score']='" + similarity.lengthNorm("a_t",4)  + "'");  // sqrt(4)==2 and is exactly representable when quantized to a byte
+        "//float[@name='score']='" + similarity.computeNorm("a_t",state)  + "'");  // sqrt(4)==2 and is exactly representable when quantized to a byte
 
     // test that ord and rord are working on a global index basis, not just
     // at the segment level (since Lucene 2.9 has switched to per-segment searching)

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java Thu Jan 13 02:09:33 2011
@@ -31,7 +31,7 @@ import org.junit.Test;
 public class NoCacheHeaderTest extends CacheHeaderTestBase {
   @BeforeClass
   public static void beforeTest() throws Exception {
-    createJetty("solr/", "solr/conf/solrconfig-nocache.xml", null);
+    createJetty(TEST_HOME, "solr/conf/solrconfig-nocache.xml", null);
   }
 
   // The tests

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java Thu Jan 13 02:09:33 2011
@@ -65,8 +65,7 @@ public class FileBasedSpellCheckerTest e
     spellchecker.add("classname", FileBasedSpellChecker.class.getName());
 
     spellchecker.add(SolrSpellChecker.DICTIONARY_NAME, "external");
-    File spelling = new File("spellings.txt");
-    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, spelling.getAbsolutePath());
+    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, "spellings.txt");
     spellchecker.add(IndexBasedSpellChecker.FIELD, "teststop");
     spellchecker.add(FileBasedSpellChecker.SOURCE_FILE_CHAR_ENCODING, "UTF-8");
     File indexDir = new File(TEMP_DIR, "spellingIdx" + new Date().getTime());
@@ -102,8 +101,7 @@ public class FileBasedSpellCheckerTest e
     NamedList spellchecker = new NamedList();
     spellchecker.add("classname", FileBasedSpellChecker.class.getName());
     spellchecker.add(SolrSpellChecker.DICTIONARY_NAME, "external");
-    File spelling = new File("spellings.txt");
-    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, spelling.getAbsolutePath());
+    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, "spellings.txt");
     spellchecker.add(IndexBasedSpellChecker.FIELD, "teststop");
     spellchecker.add(FileBasedSpellChecker.SOURCE_FILE_CHAR_ENCODING, "UTF-8");
     File indexDir = new File(TEMP_DIR, "spellingIdx" + new Date().getTime());
@@ -149,8 +147,7 @@ public class FileBasedSpellCheckerTest e
     spellchecker.add("classname", FileBasedSpellChecker.class.getName());
 
     spellchecker.add(SolrSpellChecker.DICTIONARY_NAME, "external");
-    File spelling = new File("spellings.txt");
-    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, spelling.getAbsolutePath());
+    spellchecker.add(AbstractLuceneSpellChecker.LOCATION, "spellings.txt");
     spellchecker.add(FileBasedSpellChecker.SOURCE_FILE_CHAR_ENCODING, "UTF-8");
     spellchecker.add(IndexBasedSpellChecker.FIELD, "teststop");
     spellchecker.add(FileBasedSpellChecker.FIELD_TYPE, "teststop");

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.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.solr.core.SolrCore;
+import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.util.AbstractSolrTestCase;
 
 import java.io.File;
@@ -45,7 +46,8 @@ public class DirectUpdateHandlerOptimize
     SolrCore core = h.getCore();
 
     UpdateHandler updater = core.getUpdateHandler();
-    AddUpdateCommand cmd = new AddUpdateCommand();
+    SolrQueryRequest req = req();
+    AddUpdateCommand cmd = new AddUpdateCommand(req);
 
     //add just under the merge factor, so no segments are merged
     //the merge factor is 100 and the maxBufferedDocs is 2, so there should be 50 segments
@@ -57,7 +59,7 @@ public class DirectUpdateHandlerOptimize
       updater.addDoc(cmd);
     }
 
-    CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false);
+    CommitUpdateCommand cmtCmd = new CommitUpdateCommand(req, false);
     updater.commit(cmtCmd);
     updater.commit(cmtCmd);  // commit twice to give systems such as windows a chance to delete the old files
 
@@ -65,7 +67,7 @@ public class DirectUpdateHandlerOptimize
     assertNumSegments(indexDir, 50);
 
     //now do an optimize
-    cmtCmd = new CommitUpdateCommand(true);
+    cmtCmd = new CommitUpdateCommand(req, true);
     cmtCmd.maxOptimizeSegments = 25;
     updater.commit(cmtCmd);
     updater.commit(cmtCmd);
@@ -81,6 +83,8 @@ public class DirectUpdateHandlerOptimize
     updater.commit(cmtCmd);
     updater.commit(cmtCmd);
     assertNumSegments(indexDir, 1);
+
+    req.close();
   }
 
   private void assertNumSegments(String indexDir, int numSegs) {

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java Thu Jan 13 02:09:33 2011
@@ -53,138 +53,64 @@ public class DirectUpdateHandlerTest ext
     clearIndex();
     assertU(commit());
   }
-  
+
   @Test
-  public void testRequireUniqueKey() throws Exception 
-  {
-    SolrCore core = h.getCore();
-    
-    UpdateHandler updater = core.getUpdateHandler();
-    
-    AddUpdateCommand cmd = new AddUpdateCommand();
-    
+  public void testRequireUniqueKey() throws Exception {
     // Add a valid document
-    cmd.doc = new Document();
-    cmd.doc.add( new Field( "id", "AAA", Store.YES, Index.NOT_ANALYZED ) );
-    cmd.doc.add( new Field( "subject", "xxxxx", Store.YES, Index.NOT_ANALYZED ) );
-    updater.addDoc( cmd );
-    
-    // Add a document with multiple ids
-    cmd.indexedId = null;  // reset the id for this add
-    cmd.doc = new Document();
-    cmd.doc.add( new Field( "id", "AAA", Store.YES, Index.NOT_ANALYZED ) );
-    cmd.doc.add( new Field( "id", "BBB", Store.YES, Index.NOT_ANALYZED ) );
-    cmd.doc.add( new Field( "subject", "xxxxx", Store.YES, Index.NOT_ANALYZED ) );
-    try {
-      updater.addDoc( cmd );
-      fail( "added a document with multiple ids" );
-    }
-    catch( SolrException ex ) { } // expected
-
-    // Add a document without an id
-    cmd.indexedId = null;  // reset the id for this add
-    cmd.doc = new Document();
-    cmd.doc.add( new Field( "subject", "xxxxx", Store.YES, Index.NOT_ANALYZED ) );
-    try {
-      updater.addDoc( cmd );
-      fail( "added a document without an ids" );
-    }
-    catch( SolrException ex ) { } // expected
-  }
+    assertU(adoc("id","1"));
 
-  @Test
-  public void testUncommit() throws Exception {
-    addSimpleDoc("A");
+    // More than one id should fail
+    assertFailedU(adoc("id","2", "id","ignore_exception", "text","foo"));
 
-    // search - not committed - "A" should not be found.
-    Map<String,String> args = new HashMap<String, String>();
-    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<String,String> args = new HashMap<String, String>();
-    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<String,String> args = new HashMap<String, String>();
-    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<String,String> args = new HashMap<String, String>();
@@ -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<String,String> args = new HashMap<String, String>();
@@ -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; j<fields.length; j+=2) {
           String field = fields[j];
           String val = fields[j+1];
-          Field f = schema.getField(field).createField(val, 1.0f);
+          Fieldable f = schema.getField(field).createField(val, 1.0f);
           add.doc.add(f);
         }
       }
@@ -111,7 +112,7 @@ public class TestIndexingPerformance ext
     log.info("iter="+iter +" time=" + (end-start) + " throughput=" + ((long)iter*1000)/(end-start));
 
     //discard all the changes
-    updateHandler.rollback(new RollbackUpdateCommand());
+    updateHandler.rollback(new RollbackUpdateCommand(req));
 
     req.close();
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/AbstractSolrTestCase.java Thu Jan 13 02:09:33 2011
@@ -20,6 +20,7 @@ package org.apache.solr.util;
 
 
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.core.SolrConfig;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
@@ -84,6 +85,14 @@ public abstract class AbstractSolrTestCa
   public abstract String getSolrConfigFile();
 
   /**
+   * Subclasses can override this to change a test's solr home
+   * (default is in test-files)
+   */
+  public String getSolrHome() {
+    return SolrTestCaseJ4.TEST_HOME;
+  }
+  
+  /**
    * The directory used to story the index managed by the TestHarness h
    */
   protected File dataDir;
@@ -113,8 +122,8 @@ public abstract class AbstractSolrTestCa
     dataDir = new File(TEMP_DIR,
             getClass().getName() + "-" + System.currentTimeMillis());
     dataDir.mkdirs();
-
     String configFile = getSolrConfigFile();
+    System.setProperty("solr.solr.home", getSolrHome());
     if (configFile != null) {
 
       solrConfig = h.createConfig(getSolrConfigFile());
@@ -408,4 +417,9 @@ public abstract class AbstractSolrTestCa
     }
     return f.delete();
   }
+
+  /** @see SolrTestCaseJ4#getFile */
+  public static File getFile(String name) throws IOException {
+    return SolrTestCaseJ4.getFile(name);
+  }
 }

Modified: lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java Thu Jan 13 02:09:33 2011
@@ -18,6 +18,8 @@
 package org.apache.solr.util;
 
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.search.QParser;
 import org.apache.solr.util.SolrPluginUtils;
 import org.apache.solr.util.SolrPluginUtils.DisjunctionMaxQueryParser;
 import org.apache.solr.search.SolrIndexSearcher;
@@ -156,9 +158,12 @@ public class SolrPluginUtilsTest extends
         
     Query out;
     String t;
-        
+
+    SolrQueryRequest req = req();
+    QParser qparser = QParser.getParser("hi", "dismax", req);
+
     DisjunctionMaxQueryParser qp =
-      new SolrPluginUtils.DisjunctionMaxQueryParser(h.getCore().getSchema());
+      new SolrPluginUtils.DisjunctionMaxQueryParser(qparser, req.getSchema().getDefaultSearchFieldName());
 
     qp.addAlias("hoss", 0.01f, SolrPluginUtils.parseFieldBoosts
                 ("title^2.0 title_stemmed name^1.2 subject^0.5"));

Modified: lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java?rev=1058390&r1=1058389&r2=1058390&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/webapp/src/org/apache/solr/servlet/DirectSolrConnection.java Thu Jan 13 02:09:33 2011
@@ -53,19 +53,8 @@ import org.apache.solr.schema.IndexSchem
  */
 public class DirectSolrConnection 
 {
-  final SolrCore core;
-  final SolrRequestParsers parser;
-  
-  /**
-   * Initialize using the static singleton SolrCore.getSolrCore().
-   * 
-   * @deprecated use {@link #DirectSolrConnection(SolrCore)}
-   */
-  @Deprecated
-  public DirectSolrConnection()
-  {
-    this( SolrCore.getSolrCore() );
-  }
+  protected final SolrCore core;
+  protected final SolrRequestParsers parser;
 
   /**
    * Initialize using an explicit SolrCore
@@ -75,54 +64,6 @@ public class DirectSolrConnection 
     core = c;
     parser = new SolrRequestParsers( c.getSolrConfig() );
   }
-
-  /**
-   * This constructor is designed to make it easy for JNI embedded applications 
-   * to setup the entire solr environment with a simple interface.  It takes three parameters:
-   * 
-   * <code>instanceDir:</code> The solr instance directory.  If null, it will check the standard 
-   * places first (JNDI,properties,"solr" directory)
-   * 
-   * <code>dataDir:</code> where the index is stored. 
-   * 
-   * <code>loggingPath:</code> 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 @@
     <url-pattern>/*</url-pattern>
   </filter-mapping>
 
-  <!-- Otherwise it will continue to the old servlets -->
-  
-  <servlet>
-    <servlet-name>SolrServer</servlet-name>
-    <display-name>Solr</display-name>
-    <description>Solr Server</description>
-    <servlet-class>org.apache.solr.servlet.SolrServlet</servlet-class>
-    <load-on-startup>1</load-on-startup>
-  </servlet>
-
-  <servlet>
-    <servlet-name>SolrUpdate</servlet-name>
-    <display-name>SolrUpdate</display-name>
-    <description>Solr Update Handler</description>
-    <servlet-class>org.apache.solr.servlet.SolrUpdateServlet</servlet-class>
-    <load-on-startup>2</load-on-startup>
-  </servlet>
-
   <servlet>
     <servlet-name>Logging</servlet-name>
     <servlet-class>org.apache.solr.servlet.LogLevelSelection</servlet-class>
   </servlet>
 
-  <!-- @Deprecated -->
-  <servlet>
-    <servlet-name>ping</servlet-name>
-    <jsp-file>/admin/ping.jsp</jsp-file>
-  </servlet>
-
-  <servlet-mapping>
-    <servlet-name>SolrServer</servlet-name>
-    <url-pattern>/select/*</url-pattern>
-  </servlet-mapping>
-
-  <servlet-mapping>
-    <servlet-name>SolrUpdate</servlet-name>
-    <url-pattern>/update/*</url-pattern>
-  </servlet-mapping>
-
   <servlet-mapping>
     <servlet-name>Logging</servlet-name>
     <url-pattern>/admin/logging</url-pattern>
   </servlet-mapping>
 
-  <!-- @Deprecated -->
-  <servlet-mapping>
-    <servlet-name>ping</servlet-name>
-    <url-pattern>/admin/ping</url-pattern>
-  </servlet-mapping>
-
-  <!-- @Deprecated -->
-  <servlet-mapping>
-    <servlet-name>Logging</servlet-name>
-    <url-pattern>/admin/logging.jsp</url-pattern>
-  </servlet-mapping>
-  
   <mime-mapping>
     <extension>.xsl</extension>
     <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->

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" ) );
 %>
 
 </table><P>

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"%>



Mime
View raw message