You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/01/14 19:54:24 UTC

svn commit: r1433035 [4/4] - in /lucene/dev/branches/lucene4547: ./ dev-tools/ dev-tools/scripts/ lucene/ lucene/analysis/ lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/dict/ lucene/analysis/kuromoji/src/resources/org/apache/lucene/an...

Modified: lucene/dev/branches/lucene4547/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -44,8 +44,8 @@
     in that directory which completely match the regex (anchored on both
     ends) will be included.
   -->
-  <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
-  <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
+  <lib dir="../../dist/" regex="solr-cell-\d.*\.jar" />
+  <lib dir="../../dist/" regex="solr-clustering-\d.*\.jar" />
   <!--
     If a dir option (with or without a regex) is used and nothing is
     found that matches, it will be ignored

Modified: lucene/dev/branches/lucene4547/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -24,7 +24,7 @@
   <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
 
   <lib dir="../../contrib/velocity/lib" />
-  <lib dir="../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
+  <lib dir="../../dist/" regex="solr-velocity-\d.*\.jar" />
   <dataDir>${solr.data.dir:}</dataDir>
 
 

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/Overseer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/Overseer.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/Overseer.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/Overseer.java Mon Jan 14 18:54:22 2013
@@ -22,14 +22,12 @@ import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.NoSuchElementException;
 
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.ClosableThread;
+import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.DocRouter;
-import org.apache.solr.common.cloud.DocRouter;
 import org.apache.solr.common.cloud.ImplicitDocRouter;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.Slice;
@@ -37,7 +35,6 @@ import org.apache.solr.common.cloud.Solr
 import org.apache.solr.common.cloud.ZkCoreNodeProps;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.cloud.ZkStateReader;
-import org.apache.solr.common.cloud.ZooKeeperException;
 import org.apache.solr.handler.component.ShardHandler;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
@@ -78,46 +75,48 @@ public class Overseer {
     @Override
     public void run() {
         
-      if(!this.isClosed && amILeader()) {
+      if (!this.isClosed && amILeader()) {
         // see if there's something left from the previous Overseer and re
         // process all events that were not persisted into cloud state
-          synchronized (reader.getUpdateLock()) { //XXX this only protects against edits inside single node
-            try {
-              byte[] head = workQueue.peek();
+        synchronized (reader.getUpdateLock()) { // XXX this only protects
+                                                // against edits inside single
+                                                // node
+          try {
+            byte[] head = workQueue.peek();
+            
+            if (head != null) {
+              reader.updateClusterState(true);
+              ClusterState clusterState = reader.getClusterState();
+              log.info("Replaying operations from work queue.");
               
-              if (head != null) {
-                reader.updateClusterState(true);
-                ClusterState clusterState = reader.getClusterState();
-                log.info("Replaying operations from work queue.");
+              while (head != null && amILeader()) {
+                final ZkNodeProps message = ZkNodeProps.load(head);
+                final String operation = message.getStr(QUEUE_OPERATION);
+                clusterState = processMessage(clusterState, message, operation);
+                zkClient.setData(ZkStateReader.CLUSTER_STATE,
+                    ZkStateReader.toJSON(clusterState), true);
                 
-                while (head != null && amILeader()) {
-                  final ZkNodeProps message = ZkNodeProps.load(head);
-                  final String operation = message
-                      .getStr(QUEUE_OPERATION);
-                  clusterState = processMessage(clusterState, message, operation);
-                  zkClient.setData(ZkStateReader.CLUSTER_STATE,
-                      ZkStateReader.toJSON(clusterState), true);
-                  
-                  workQueue.poll();
-                  
-                  head = workQueue.peek();
-                }
-              }
-            } catch (KeeperException e) {
-              if (e.code() == KeeperException.Code.SESSIONEXPIRED
-                  || e.code() == KeeperException.Code.CONNECTIONLOSS) {
-                log.warn("Solr cannot talk to ZK");
-                return;
+                workQueue.poll();
+                
+                head = workQueue.peek();
               }
-              SolrException.log(log, "", e);
-              throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
-                  "", e);
-            } catch (InterruptedException e) {
-              Thread.currentThread().interrupt();
+            }
+          } catch (KeeperException e) {
+            if (e.code() == KeeperException.Code.SESSIONEXPIRED) {
+              log.warn("Solr cannot talk to ZK, exiting Overseer work queue loop", e);
               return;
             }
+            log.error("Exception in Overseer work queue loop", e);
+          } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            return;
+            
+          } catch (Exception e) {
+            log.error("Exception in Overseer work queue loop", e);
           }
         }
+        
+      }
       
       log.info("Starting to work on the main queue");
       while (!this.isClosed && amILeader()) {
@@ -146,17 +145,17 @@ public class Overseer {
             while (workQueue.poll() != null);
             
           } catch (KeeperException e) {
-            if (e.code() == KeeperException.Code.SESSIONEXPIRED
-                || e.code() == KeeperException.Code.CONNECTIONLOSS) {
-              log.warn("Overseer cannot talk to ZK");
+            if (e.code() == KeeperException.Code.SESSIONEXPIRED) {
+              log.warn("Solr cannot talk to ZK, exiting Overseer main queue loop", e);
               return;
             }
-            SolrException.log(log, "", e);
-            throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
-                "", e);
+            log.error("Exception in Overseer main queue loop", e);
           } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
             return;
+            
+          } catch (Exception e) {
+            log.error("Exception in Overseer main queue loop", e);
           }
         }
         

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A {@link DirectoryFactory} impl base class for caching Directory instances
  * per path. Most DirectoryFactory implementations will want to extend this
- * class and simply implement {@link DirectoryFactory#create(String)}.
+ * class and simply implement {@link DirectoryFactory#create(String, DirContext)}.
  * 
  */
 public abstract class CachingDirectoryFactory extends DirectoryFactory {
@@ -202,7 +202,7 @@ public abstract class CachingDirectoryFa
   }
   
   @Override
-  protected abstract Directory create(String path) throws IOException;
+  protected abstract Directory create(String path, DirContext dirContext) throws IOException;
   
   @Override
   public boolean exists(String path) {
@@ -218,9 +218,9 @@ public abstract class CachingDirectoryFa
    * java.lang.String)
    */
   @Override
-  public final Directory get(String path, String rawLockType)
+  public final Directory get(String path,  DirContext dirContext, String rawLockType)
       throws IOException {
-    return get(path, rawLockType, false);
+    return get(path, dirContext, rawLockType, false);
   }
   
   /*
@@ -230,7 +230,7 @@ public abstract class CachingDirectoryFa
    * java.lang.String, boolean)
    */
   @Override
-  public final Directory get(String path, String rawLockType, boolean forceNew)
+  public final Directory get(String path,  DirContext dirContext, String rawLockType, boolean forceNew)
       throws IOException {
     String fullPath = new File(path).getAbsolutePath();
     synchronized (this) {
@@ -264,7 +264,7 @@ public abstract class CachingDirectoryFa
       }
       
       if (directory == null || forceNew) { 
-        directory = create(fullPath);
+        directory = create(fullPath, dirContext);
         
         directory = rateLimit(directory);
         

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CoreContainer.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/CoreContainer.java Mon Jan 14 18:54:22 2013
@@ -1626,10 +1626,15 @@ public class CoreContainer 
     return schema;
   }
   
-  private static final String DEF_SOLR_XML ="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
-          "<solr persistent=\"false\">\n" +
-          "  <cores adminPath=\"/admin/cores\" defaultCoreName=\"" + DEFAULT_DEFAULT_CORE_NAME + "\">\n" +
-          "    <core name=\""+ DEFAULT_DEFAULT_CORE_NAME + "\" shard=\"${shard:}\" instanceDir=\"collection1\" />\n" +
-          "  </cores>\n" +
-          "</solr>";
+  private static final String DEF_SOLR_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+      + "<solr persistent=\"false\">\n"
+      + "  <cores adminPath=\"/admin/cores\" defaultCoreName=\""
+      + DEFAULT_DEFAULT_CORE_NAME
+      + "\""
+      + " host=\"${host:}\" hostPort=\"${hostPort:}\" hostContext=\"${hostContext:}\" zkClientTimeout=\"${zkClientTimeout:15000}\""
+      + ">\n"
+      + "    <core name=\""
+      + DEFAULT_DEFAULT_CORE_NAME
+      + "\" shard=\"${shard:}\" collection=\"${collection:}\" instanceDir=\"collection1\" />\n"
+      + "  </cores>\n" + "</solr>";
 }

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/DirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -41,6 +41,8 @@ public abstract class DirectoryFactory i
   // A large estimate should currently have no other side effects.
   public static final IOContext IOCONTEXT_NO_CACHE = new IOContext(new FlushInfo(10*1000*1000, 100L*1000*1000*1000));
 
+  // hint about what the directory contains - default is index directory
+  public enum DirContext {DEFAULT, META_DATA}
 
   private static final Logger log = LoggerFactory.getLogger(DirectoryFactory.class.getName());
   
@@ -71,7 +73,7 @@ public abstract class DirectoryFactory i
    * 
    * @throws IOException If there is a low-level I/O error.
    */
-  protected abstract Directory create(String path) throws IOException;
+  protected abstract Directory create(String path,  DirContext dirContext) throws IOException;
   
   /**
    * Returns true if a Directory exists for a given path.
@@ -118,7 +120,7 @@ public abstract class DirectoryFactory i
    * 
    * @throws IOException If there is a low-level I/O error.
    */
-  public abstract Directory get(String path, String rawLockType)
+  public abstract Directory get(String path, DirContext dirContext, String rawLockType)
       throws IOException;
   
   /**
@@ -130,7 +132,7 @@ public abstract class DirectoryFactory i
    * 
    * @throws IOException If there is a low-level I/O error.
    */
-  public abstract Directory get(String path, String rawLockType,
+  public abstract Directory get(String path,  DirContext dirContext, String rawLockType,
       boolean forceNew) throws IOException;
   
   /**

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -22,6 +22,7 @@ import org.apache.lucene.store.LockFacto
 import org.apache.lucene.store.MMapDirectory;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,7 +57,7 @@ public class MMapDirectoryFactory extend
   }
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     MMapDirectory mapDirectory = new MMapDirectory(new File(path), null, maxChunk);
     try {
       mapDirectory.setUseUnmap(unmapHack);

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -18,6 +18,7 @@ package org.apache.solr.core;
 
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.NIOFSDirectory;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 
 import java.io.File;
 import java.io.IOException;
@@ -30,7 +31,7 @@ import java.io.IOException;
 public class NIOFSDirectoryFactory extends StandardDirectoryFactory {
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     return new NIOFSDirectory(new File(path));
   }
   

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NRTCachingDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NRTCachingDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NRTCachingDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/NRTCachingDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -25,6 +25,7 @@ import org.apache.lucene.store.FSDirecto
 import org.apache.lucene.store.NRTCachingDirectory;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 
 /**
  * Factory to instantiate {@link org.apache.lucene.store.NRTCachingDirectory}
@@ -48,7 +49,7 @@ public class NRTCachingDirectoryFactory 
   }
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     return new NRTCachingDirectory(FSDirectory.open(new File(path)), maxMergeSizeMB, maxCachedMB);
   }
 

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/RAMDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -28,7 +28,7 @@ import org.apache.lucene.store.RAMDirect
 public class RAMDirectoryFactory extends EphemeralDirectoryFactory {
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     return new RAMDirectory();
   }
 

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SimpleFSDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SimpleFSDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SimpleFSDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SimpleFSDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -18,6 +18,7 @@ package org.apache.solr.core;
 
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.SimpleFSDirectory;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 
 import java.io.File;
 import java.io.IOException;
@@ -30,7 +31,7 @@ import java.io.IOException;
 public class SimpleFSDirectoryFactory extends StandardDirectoryFactory {
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     return new SimpleFSDirectory(new File(path));
   }
 

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/SolrCore.java Mon Jan 14 18:54:22 2013
@@ -69,6 +69,7 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.handler.SnapPuller;
 import org.apache.solr.handler.admin.ShowFileRequestHandler;
 import org.apache.solr.handler.component.DebugComponent;
@@ -237,7 +238,7 @@ public final class SolrCore implements S
     Properties p = new Properties();
     Directory dir = null;
     try {
-      dir = getDirectoryFactory().get(getDataDir(), getSolrConfig().indexConfig.lockType);
+      dir = getDirectoryFactory().get(getDataDir(), DirContext.META_DATA, getSolrConfig().indexConfig.lockType);
       if (dir.fileExists(SnapPuller.INDEX_PROPERTIES)){
         final IndexInput input = dir.openInput(SnapPuller.INDEX_PROPERTIES, IOContext.DEFAULT);
   
@@ -454,7 +455,7 @@ public final class SolrCore implements S
 
       if (indexExists && firstTime && !reload) {
         
-        Directory dir = directoryFactory.get(indexDir,
+        Directory dir = directoryFactory.get(indexDir, DirContext.DEFAULT,
             getSolrConfig().indexConfig.lockType);
         try {
           if (IndexWriter.isLocked(dir)) {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/StandardDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/StandardDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/StandardDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/core/StandardDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -35,7 +35,7 @@ import org.apache.lucene.store.IOContext
 public class StandardDirectoryFactory extends CachingDirectoryFactory {
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     return FSDirectory.open(new File(path));
   }
   

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java Mon Jan 14 18:54:22 2013
@@ -60,6 +60,7 @@ import org.apache.solr.core.IndexDeletio
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrDeletionPolicy;
 import org.apache.solr.core.SolrEventListener;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.BinaryQueryResponseWriter;
 import org.apache.solr.response.SolrQueryResponse;
@@ -361,7 +362,7 @@ public class ReplicationHandler extends 
       // use a set to workaround possible Lucene bug which returns same file
       // name multiple times
       Collection<String> files = new HashSet<String>(commit.getFileNames());
-      dir = core.getDirectoryFactory().get(core.getNewIndexDir(), core.getSolrConfig().indexConfig.lockType);
+      dir = core.getDirectoryFactory().get(core.getNewIndexDir(), DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
       try {
         
         for (String fileName : files) {
@@ -467,7 +468,7 @@ public class ReplicationHandler extends 
     Directory dir;
     long size = 0;
     try {
-      dir = core.getDirectoryFactory().get(core.getNewIndexDir(), core.getSolrConfig().indexConfig.lockType);
+      dir = core.getDirectoryFactory().get(core.getNewIndexDir(), DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
       try {
         size = DirectoryFactory.sizeOfDirectory(dir);
       } finally {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapPuller.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapPuller.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapPuller.java Mon Jan 14 18:54:22 2013
@@ -86,6 +86,7 @@ import org.apache.solr.common.util.Execu
 import org.apache.solr.common.util.FastInputStream;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.CachingDirectoryFactory.CloseListener;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.core.DirectoryFactory;
 import org.apache.solr.core.IndexDeletionPolicyWrapper;
 import org.apache.solr.core.SolrCore;
@@ -369,16 +370,18 @@ public class SnapPuller {
       filesDownloaded = Collections.synchronizedList(new ArrayList<Map<String, Object>>());
       // if the generateion of master is older than that of the slave , it means they are not compatible to be copied
       // then a new index direcory to be created and all the files need to be copied
-      boolean isFullCopyNeeded = IndexDeletionPolicyWrapper.getCommitTimestamp(commit) >= latestVersion || forceReplication;
-      
+      boolean isFullCopyNeeded = IndexDeletionPolicyWrapper
+          .getCommitTimestamp(commit) >= latestVersion
+          || commit.getGeneration() >= latestGeneration || forceReplication;
+
       String tmpIdxDirName = "index." + new SimpleDateFormat(SnapShooter.DATE_FMT, Locale.ROOT).format(new Date());
       tmpIndex = createTempindexDir(core, tmpIdxDirName);
 
-      tmpIndexDir = core.getDirectoryFactory().get(tmpIndex, core.getSolrConfig().indexConfig.lockType);
+      tmpIndexDir = core.getDirectoryFactory().get(tmpIndex, DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
       
       // make sure it's the newest known index dir...
       indexDirPath = core.getNewIndexDir();
-      indexDir = core.getDirectoryFactory().get(indexDirPath, core.getSolrConfig().indexConfig.lockType);
+      indexDir = core.getDirectoryFactory().get(indexDirPath, DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
       Directory oldDirectory = null;
 
       try {
@@ -542,7 +545,7 @@ public class SnapPuller {
     long replicationTimeTaken = (replicationTime - getReplicationStartTime()) / 1000;
     Directory dir = null;
     try {
-      dir = solrCore.getDirectoryFactory().get(solrCore.getDataDir(), solrCore.getSolrConfig().indexConfig.lockType);
+      dir = solrCore.getDirectoryFactory().get(solrCore.getDataDir(), DirContext.META_DATA, solrCore.getSolrConfig().indexConfig.lockType);
       
       int indexCount = 1, confFilesCount = 1;
       if (props.containsKey(TIMES_INDEX_REPLICATED)) {
@@ -725,7 +728,7 @@ public class SnapPuller {
     String indexDir = solrCore.getIndexDir();
     
     // it's okay to use null for lock factory since we know this dir will exist
-    Directory dir = solrCore.getDirectoryFactory().get(indexDir, solrCore.getSolrConfig().indexConfig.lockType);
+    Directory dir = solrCore.getDirectoryFactory().get(indexDir, DirContext.DEFAULT, solrCore.getSolrConfig().indexConfig.lockType);
     try {
       for (Map<String,Object> file : filesToDownload) {
         if (!dir.fileExists((String) file.get(NAME)) || downloadCompleteIndex) {
@@ -848,7 +851,7 @@ public class SnapPuller {
     Properties p = new Properties();
     Directory dir = null;
     try {
-      dir = solrCore.getDirectoryFactory().get(solrCore.getDataDir(), solrCore.getSolrConfig().indexConfig.lockType);
+      dir = solrCore.getDirectoryFactory().get(solrCore.getDataDir(), DirContext.META_DATA, solrCore.getSolrConfig().indexConfig.lockType);
       if (dir.fileExists(SnapPuller.INDEX_PROPERTIES)){
         final IndexInput input = dir.openInput(SnapPuller.INDEX_PROPERTIES, DirectoryFactory.IOCONTEXT_NO_CACHE);
   

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapShooter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapShooter.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapShooter.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/SnapShooter.java Mon Jan 14 18:54:22 2013
@@ -35,6 +35,7 @@ import org.apache.lucene.store.Lock;
 import org.apache.lucene.store.SimpleFSLockFactory;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.DirectoryFactory;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.core.SolrCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -102,7 +103,7 @@ public class SnapShooter {
       Collection<String> files = indexCommit.getFileNames();
       FileCopier fileCopier = new FileCopier();
       
-      Directory dir = solrCore.getDirectoryFactory().get(solrCore.getNewIndexDir(), solrCore.getSolrConfig().indexConfig.lockType);
+      Directory dir = solrCore.getDirectoryFactory().get(solrCore.getNewIndexDir(), DirContext.DEFAULT, solrCore.getSolrConfig().indexConfig.lockType);
       try {
         fileCopier.copyFiles(dir, files, snapShotDir);
       } finally {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java Mon Jan 14 18:54:22 2013
@@ -57,6 +57,7 @@ import org.apache.solr.core.CoreContaine
 import org.apache.solr.core.CoreDescriptor;
 import org.apache.solr.core.DirectoryFactory;
 import org.apache.solr.core.SolrCore;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.handler.RequestHandlerBase;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
@@ -367,7 +368,7 @@ public class CoreAdminHandler extends Re
           dirsToBeReleased = new Directory[dirNames.length];
           DirectoryFactory dirFactory = core.getDirectoryFactory();
           for (int i = 0; i < dirNames.length; i++) {
-            Directory dir = dirFactory.get(dirNames[i], core.getSolrConfig().indexConfig.lockType);
+            Directory dir = dirFactory.get(dirNames[i], DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
             dirsToBeReleased[i] = dir;
             // TODO: why doesn't this use the IR factory? what is going on here?
             readersToBeClosed[i] = DirectoryReader.open(dir);
@@ -688,6 +689,8 @@ public class CoreAdminHandler extends Re
     SolrParams params = req.getParams();
 
     String cname = params.get(CoreAdminParams.CORE);
+    String indexInfo = params.get(CoreAdminParams.INDEX_INFO);
+    boolean isIndexInfoNeeded = Boolean.parseBoolean(null == indexInfo ? "true" : indexInfo);
     boolean doPersist = false;
     NamedList<Object> status = new SimpleOrderedMap<Object>();
     Map<String,Exception> allFailures = coreContainer.getCoreInitFailures();
@@ -695,7 +698,7 @@ public class CoreAdminHandler extends Re
       if (cname == null) {
         rsp.add("defaultCoreName", coreContainer.getDefaultCoreName());
         for (String name : coreContainer.getCoreNames()) {
-          status.add(name, getCoreStatus(coreContainer, name));
+          status.add(name, getCoreStatus(coreContainer, name, isIndexInfoNeeded));
         }
         rsp.add("initFailures", allFailures);
       } else {
@@ -703,7 +706,7 @@ public class CoreAdminHandler extends Re
           ? Collections.singletonMap(cname, allFailures.get(cname))
           : Collections.emptyMap();
         rsp.add("initFailures", failures);
-        status.add(cname, getCoreStatus(coreContainer, cname));
+        status.add(cname, getCoreStatus(coreContainer, cname, isIndexInfoNeeded));
       }
       rsp.add("status", status);
       doPersist = false; // no state change
@@ -987,7 +990,7 @@ public class CoreAdminHandler extends Re
     
   }
 
-  protected NamedList<Object> getCoreStatus(CoreContainer cores, String cname) throws IOException {
+  protected NamedList<Object> getCoreStatus(CoreContainer cores, String cname, boolean isIndexInfoNeeded) throws IOException {
     NamedList<Object> info = new SimpleOrderedMap<Object>();
     SolrCore core = cores.getCore(cname);
     if (core != null) {
@@ -1000,15 +1003,17 @@ public class CoreAdminHandler extends Re
         info.add("schema", core.getSchemaResource());
         info.add("startTime", new Date(core.getStartTime()));
         info.add("uptime", System.currentTimeMillis() - core.getStartTime());
-        RefCounted<SolrIndexSearcher> searcher = core.getSearcher();
-        try {
-          SimpleOrderedMap<Object> indexInfo = LukeRequestHandler.getIndexInfo(searcher.get().getIndexReader());
-          long size = getIndexSize(core);
-          indexInfo.add("sizeInBytes", size);
-          indexInfo.add("size", NumberUtils.readableSize(size));
-          info.add("index", indexInfo);
-        } finally {
-          searcher.decref();
+        if (isIndexInfoNeeded) {
+          RefCounted<SolrIndexSearcher> searcher = core.getSearcher();
+          try {
+            SimpleOrderedMap<Object> indexInfo = LukeRequestHandler.getIndexInfo(searcher.get().getIndexReader());
+            long size = getIndexSize(core);
+            indexInfo.add("sizeInBytes", size);
+            indexInfo.add("size", NumberUtils.readableSize(size));
+            info.add("index", indexInfo);
+          } finally {
+            searcher.decref();
+          }
         }
       } finally {
         core.close();
@@ -1022,9 +1027,9 @@ public class CoreAdminHandler extends Re
     long size = 0;
     try {
       if (!core.getDirectoryFactory().exists(core.getIndexDir())) {
-        dir = core.getDirectoryFactory().get(core.getNewIndexDir(), core.getSolrConfig().indexConfig.lockType);
+        dir = core.getDirectoryFactory().get(core.getNewIndexDir(), DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType);
       } else {
-        dir = core.getDirectoryFactory().get(core.getIndexDir(), core.getSolrConfig().indexConfig.lockType); 
+        dir = core.getDirectoryFactory().get(core.getIndexDir(), DirContext.DEFAULT, core.getSolrConfig().indexConfig.lockType); 
       }
 
       try {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java Mon Jan 14 18:54:22 2013
@@ -49,6 +49,7 @@ import org.apache.solr.core.DirectoryFac
 import org.apache.solr.core.SolrConfig;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrInfoMBean;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrRequestInfo;
@@ -119,7 +120,7 @@ public class SolrIndexSearcher extends I
 
   public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, boolean enableCache, DirectoryFactory directoryFactory) throws IOException {
     // we don't need to reserve the directory because we get it from the factory
-    this(core, schema,name, core.getIndexReaderFactory().newReader(directoryFactory.get(path, config.lockType), core), true, enableCache, false, directoryFactory);
+    this(core, schema,name, core.getIndexReaderFactory().newReader(directoryFactory.get(path, DirContext.DEFAULT, config.lockType), core), true, enableCache, false, directoryFactory);
   }
 
   private static String getIndexDir(Directory dir) {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java Mon Jan 14 18:54:22 2013
@@ -32,6 +32,7 @@ import org.apache.lucene.util.InfoStream
 import org.apache.lucene.util.PrintStreamInfoStream;
 import org.apache.lucene.util.ThreadInterruptedException;
 import org.apache.solr.core.DirectoryFactory;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.apache.solr.schema.IndexSchema;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,7 +59,7 @@ public class SolrIndexWriter extends Ind
   public static SolrIndexWriter create(String name, String path, DirectoryFactory directoryFactory, boolean create, IndexSchema schema, SolrIndexConfig config, IndexDeletionPolicy delPolicy, Codec codec, boolean forceNewDirectory) throws IOException {
 
     SolrIndexWriter w = null;
-    final Directory d = directoryFactory.get(path, config.lockType, forceNewDirectory);
+    final Directory d = directoryFactory.get(path, DirContext.DEFAULT, config.lockType, forceNewDirectory);
     try {
       w = new SolrIndexWriter(name, path, d, create, schema, 
                               config, delPolicy, codec);

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java Mon Jan 14 18:54:22 2013
@@ -134,7 +134,13 @@ public class SignatureUpdateProcessorFac
       if (enabled) {
         SolrInputDocument doc = cmd.getSolrInputDocument();
         List<String> currDocSigFields = null;
+        boolean isPartialUpdate = DistributedUpdateProcessor.isAtomicUpdate(cmd);
         if (sigFields == null || sigFields.size() == 0) {
+          if (isPartialUpdate)  {
+            throw new SolrException
+                (ErrorCode.SERVER_ERROR,
+                    "Can't use SignatureUpdateProcessor with partial updates on signature fields");
+          }
           Collection<String> docFields = doc.getFieldNames();
           currDocSigFields = new ArrayList<String>(docFields.size());
           currDocSigFields.addAll(docFields);
@@ -149,6 +155,12 @@ public class SignatureUpdateProcessorFac
         for (String field : currDocSigFields) {
           SolrInputField f = doc.getField(field);
           if (f != null) {
+            if (isPartialUpdate)  {
+              throw new SolrException
+                  (ErrorCode.SERVER_ERROR,
+                      "Can't use SignatureUpdateProcessor with partial update request " +
+                          "containing signature field: " + field);
+            }
             sig.add(field);
             Object o = f.getValue();
             if (o instanceof Collection) {

Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/util/SimplePostTool.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/util/SimplePostTool.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/util/SimplePostTool.java Mon Jan 14 18:54:22 2013
@@ -196,7 +196,8 @@ public class SimplePostTool {
         fatal("System Property 'data' is not valid for this tool: " + mode);
       }
       String params = System.getProperty("params", "");
-      urlStr = System.getProperty("url", SimplePostTool.appendParam(DEFAULT_POST_URL, params));
+      urlStr = System.getProperty("url", DEFAULT_POST_URL);
+      urlStr = SimplePostTool.appendParam(urlStr, params);
       URL url = new URL(urlStr);
       boolean auto = isOn(System.getProperty("auto", DEFAULT_AUTO));
       String type = System.getProperty("type");
@@ -800,7 +801,7 @@ public class SimplePostTool {
             " " + urlc.getResponseMessage() + " for url "+url);
       }
     } catch (IOException e) {
-      warn("An error occured posting data to "+url+". Please check that Solr is running.");
+      warn("An error occurred posting data to "+url+". Please check that Solr is running.");
     }
   }
 

Modified: lucene/dev/branches/lucene4547/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml Mon Jan 14 18:54:22 2013
@@ -47,6 +47,29 @@
     </updateLog>
   </updateHandler>
 
+  <updateRequestProcessorChain name="dedupe">
+    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
+      <bool name="enabled">true</bool>
+      <bool name="overwriteDupes">true</bool>
+      <str name="fields">v_t,t_field</str>
+      <str name="signatureClass">org.apache.solr.update.processor.TextProfileSignature</str>
+    </processor>
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+  <updateRequestProcessorChain name="stored_sig">
+    <!-- this chain is valid even though the signature field is not
+         indexed, because we are not asking for dups to be overwritten
+      -->
+    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
+      <bool name="enabled">true</bool>
+      <str name="signatureField">non_indexed_signature_sS</str>
+      <bool name="overwriteDupes">false</bool>
+      <str name="fields">v_t,t_field</str>
+      <str name="signatureClass">org.apache.solr.update.processor.TextProfileSignature</str>
+    </processor>
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+
   <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
 
 </config>

Modified: lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java Mon Jan 14 18:54:22 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.store.Directory;
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -46,7 +47,7 @@ public class AlternateDirectoryTest exte
     public static volatile Directory dir;
     
     @Override
-    public Directory create(String path) throws IOException {
+    public Directory create(String path, DirContext dirContext) throws IOException {
       openCalled = true;
 
       return dir = newFSDirectory(new File(path));

Modified: lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java Mon Jan 14 18:54:22 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.solr.core.DirectoryFactory.DirContext;
 
 /**
  * Test-case for RAMDirectoryFactory
@@ -37,13 +38,13 @@ public class RAMDirectoryFactoryTest ext
     final Directory directory = new RAMDirectory();
     RAMDirectoryFactory factory = new RAMDirectoryFactory()  {
       @Override
-      protected Directory create(String path) {
+      protected Directory create(String path, DirContext dirContext) {
         return directory;
       }
     };
     String path = "/fake/path";
-    Directory dir1 = factory.get(path, null);
-    Directory dir2 = factory.get(path, null);
+    Directory dir1 = factory.get(path, DirContext.DEFAULT, null);
+    Directory dir2 = factory.get(path, DirContext.DEFAULT, null);
     assertEquals("RAMDirectoryFactory should not create new instance of RefCntRamDirectory " +
         "every time open() is called for the same path", dir1, dir2);
 
@@ -53,7 +54,7 @@ public class RAMDirectoryFactoryTest ext
 
   private void dotestOpenSucceedForEmptyDir() throws IOException {
     RAMDirectoryFactory factory = new RAMDirectoryFactory();
-    Directory dir = factory.get("/fake/path", null);
+    Directory dir = factory.get("/fake/path", DirContext.DEFAULT, null);
     assertNotNull("RAMDirectoryFactory should create RefCntRamDirectory even if the path doen't lead " +
         "to index directory on the file system", dir);
     factory.release(dir);

Modified: lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java Mon Jan 14 18:54:22 2013
@@ -64,7 +64,7 @@ public class SignatureUpdateProcessorFac
     chain = "dedupe"; // set the default that most tests expect
   }
 
-  void checkNumDocs(int n) {
+  static void checkNumDocs(int n) {
     SolrQueryRequest req = req();
     try {
       assertEquals(n, req.getSearcher().getIndexReader().numDocs());
@@ -353,7 +353,11 @@ public class SignatureUpdateProcessorFac
     }
   }
 
-  private void addDoc(String doc) throws Exception {
+  private void addDoc(String doc) throws Exception  {
+    addDoc(doc, chain);
+  }
+
+  static void addDoc(String doc, String chain) throws Exception {
     Map<String, String[]> params = new HashMap<String, String[]>();
     MultiMapSolrParams mmparams = new MultiMapSolrParams(params);
     params.put(UpdateParams.UPDATE_CHAIN, new String[] { chain });

Modified: lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/util/SimplePostToolTest.java Mon Jan 14 18:54:22 2013
@@ -56,6 +56,7 @@ public class SimplePostToolTest extends 
     t_web = SimplePostTool.parseArgsAndInit(args);
 
     System.setProperty("params", "param1=foo&param2=bar");
+    System.setProperty("url", "http://localhost:5150/solr/update");
     t_test = SimplePostTool.parseArgsAndInit(args);
 
     pf = new MockPageFetcher();
@@ -76,7 +77,7 @@ public class SimplePostToolTest extends 
     assertEquals(1, t_web.recursive);
     assertEquals(10, t_web.delay);
     
-    assertNotNull(t_test.solrUrl);
+    assertEquals("http://localhost:5150/solr/update?param1=foo&param2=bar",t_test.solrUrl.toExternalForm());
   }
   
   @Test

Modified: lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/db/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/db/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/db/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/db/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -28,7 +28,7 @@
 
   <jmx />
 
-  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+  <lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
 
   <!-- <indexConfig> section could go here, but we want the defaults -->
 

Modified: lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/mail/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/mail/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/mail/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -34,7 +34,7 @@
   <lib dir="../../../../contrib/extraction/lib" />
 
   <lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
-  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+  <lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
   
   <!-- <indexConfig> section could go here, but we want the defaults -->
 

Modified: lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/rss/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/rss/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/rss/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -28,7 +28,7 @@
 
   <jmx />
 
-  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+  <lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
 
   <!-- <indexConfig> section could go here, but we want the defaults -->
 

Modified: lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/solr/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/solr/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -28,7 +28,7 @@
 
   <jmx />
 
-  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+  <lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
 
   <!-- <indexConfig> section could go here, but we want the defaults -->
 

Modified: lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/tika/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/tika/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/example-DIH/solr/tika/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -34,7 +34,7 @@
   <lib dir="../../../../contrib/extraction/lib" />
 
   <lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
-  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+  <lib dir="../../../../dist/" regex="solr-dataimporthandler-.*\.jar" />
 
   <!-- <indexConfig> section could go here, but we want the defaults -->
 

Modified: lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml Mon Jan 14 18:54:22 2013
@@ -70,16 +70,16 @@
        with their external dependencies.
     -->
   <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
-  <lib dir="../../../dist/" regex="apache-solr-cell-\d.*\.jar" />
+  <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
 
   <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
-  <lib dir="../../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
+  <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
 
   <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
-  <lib dir="../../../dist/" regex="apache-solr-langid-\d.*\.jar" />
+  <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
 
   <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
-  <lib dir="../../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
+  <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
 
   <!-- If a 'dir' option (with or without a regex) is used and nothing
        is found that matches, it will be ignored

Modified: lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java (original)
+++ lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java Mon Jan 14 18:54:22 2013
@@ -42,6 +42,7 @@ public class CoreAdminRequest extends So
 {
   protected String core = null;
   protected String other = null;
+  protected boolean isIndexInfoNeeded = true;
   protected CoreAdminParams.CoreAdminAction action = null;
   
   //a create core request
@@ -383,6 +384,10 @@ public class CoreAdminRequest extends So
   {
     this.other = otherCoreName;
   }
+
+  public final void setIndexInfoNeeded(boolean isIndexInfoNeeded) {
+    this.isIndexInfoNeeded = isIndexInfoNeeded;
+  }
   
   //---------------------------------------------------------------------------------------
   //
@@ -406,6 +411,7 @@ public class CoreAdminRequest extends So
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set( CoreAdminParams.ACTION, action.toString() );
     params.set( CoreAdminParams.CORE, core );
+    params.set(CoreAdminParams.INDEX_INFO, (isIndexInfoNeeded ? "true" : "false"));
     if (other != null) {
       params.set(CoreAdminParams.OTHER, other);
     }

Modified: lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java (original)
+++ lucene/dev/branches/lucene4547/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java Mon Jan 14 18:54:22 2013
@@ -28,6 +28,9 @@ public interface CoreAdminParams 
   /** What Core are we talking about **/
   public final static String CORE = "core";
 
+  /** Should the STATUS request include index info **/
+  public final static String INDEX_INFO = "indexInfo";
+
   /** Persistent -- should it save the cores state? **/
   public final static String PERSISTENT = "persistent";
   

Modified: lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -29,7 +29,7 @@ import org.apache.lucene.util.LuceneTest
 public class MockDirectoryFactory extends EphemeralDirectoryFactory {
 
   @Override
-  protected Directory create(String path) throws IOException {
+  protected Directory create(String path, DirContext dirContext) throws IOException {
     Directory dir = LuceneTestCase.newDirectory();
     if (dir instanceof MockDirectoryWrapper) {
       MockDirectoryWrapper mockDirWrapper = (MockDirectoryWrapper) dir;

Modified: lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockFSDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockFSDirectoryFactory.java?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockFSDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene4547/solr/test-framework/src/java/org/apache/solr/core/MockFSDirectoryFactory.java Mon Jan 14 18:54:22 2013
@@ -30,7 +30,7 @@ import org.apache.lucene.util.LuceneTest
 public class MockFSDirectoryFactory extends StandardDirectoryFactory {
 
   @Override
-  public Directory create(String path) throws IOException {
+  public Directory create(String path, DirContext dirContext) throws IOException {
     Directory dir = LuceneTestCase.newFSDirectory(new File(path));
     // we can't currently do this check because of how
     // Solr has to reboot a new Directory sometimes when replicating

Modified: lucene/dev/branches/lucene4547/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/build.xml?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/build.xml (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/build.xml Mon Jan 14 18:54:22 2013
@@ -44,7 +44,7 @@
                     implementation.title="org.apache.solr"
                     spec.version="${solr.spec.version}"/>
     <ant dir="${common-solr.dir}" inheritall="false" target="contribs-add-to-war"/>
-    <war destfile="${dist}/apache-solr-${version}${solr.war.suffix}.war"
+    <war destfile="${dist}/solr-${version}${solr.war.suffix}.war"
          webxml="web/WEB-INF/web.xml"
          manifest="${manifest.file}">
       <lib dir="${common-solr.dir}/core/lib" excludes="${exclude.from.war},${common.classpath.excludes}">
@@ -54,8 +54,8 @@
       <lib dir="${common-solr.dir}/solrj/lib" excludes="${exclude.from.war},${common.classpath.excludes}"/>
       <lib dir="${lucene-libs}" excludes="${exclude.from.war},${common.classpath.excludes}" />
       <lib dir="${dist}" excludes="${exclude.from.war},${common.classpath.excludes}">
-        <include name="apache-solr-solrj-${version}.jar" />
-        <include name="apache-solr-core-${version}.jar" />
+        <include name="solr-solrj-${version}.jar" />
+        <include name="solr-core-${version}.jar" />
       </lib>
       <fileset dir="${dest}/web" excludes="${exclude.from.war}"/> <!-- contribs' additions -->
       <fileset dir="web" excludes="${exclude.from.war}"/>
@@ -64,7 +64,7 @@
   </target>
 
   <target name="dist-maven" depends="dist, filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom">
-    <m2-deploy jar.file="${dist}/apache-solr-${version}.war"
+    <m2-deploy jar.file="${dist}/solr-${version}.war"
                pom.xml="${filtered.pom.templates.dir}/solr/webapp/pom.xml"/>
   </target>
 </project>

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/dataimport.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/dataimport.css?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/dataimport.css (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/dataimport.css Mon Jan 14 18:54:22 2013
@@ -139,14 +139,14 @@
   display: none !important;
 }
 
-#content #dataimport #current_state .time,
+#content #dataimport #current_state .last_update,
 #content #dataimport #current_state .info
 {
   display: block;
   padding-left: 21px;
 }
 
-#content #dataimport #current_state .time
+#content #dataimport #current_state .last_update
 {
   color: #c0c0c0;
   font-size: 11px;

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/query.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/query.css?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/query.css (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/css/styles/query.css Mon Jan 14 18:54:22 2013
@@ -26,16 +26,22 @@
   width: 100%;
 }
 
+#content #query #form input,
+#content #query #form textarea
+{
+  width: 98%;
+}
+
 #content #query #form #start
 {
   float: left;
-  margin-right: 2%;
-  width: 49%;
+  width: 45%;
 }
 
 #content #query #form #rows
 {
-  width: 49%;
+  float: right;
+  width: 45%;
 }
 
 #content #query #form .checkbox input

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/dataimport.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/dataimport.js?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/dataimport.js (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/dataimport.js Mon Jan 14 18:54:22 2013
@@ -431,7 +431,6 @@ sammy.get
               success : function( response, text_status, xhr )
               {
                 var state_element = $( '#current_state', content_element );
-                var time_element = $( '.time', state_element );
 
                 var status = response.status;
                 var rollback_time = response.statusMessages.Rolledback || null;
@@ -448,30 +447,64 @@ sammy.get
 
                 function dataimport_compute_details( response, details_element, elapsed_seconds )
                 {
-                  var config = {
+                  details_element
+                    .show();
+
+                  // --
+
+                  var document_config = {
                     'Requests' : 'Total Requests made to DataSource',
                     'Fetched' : 'Total Rows Fetched',
                     'Skipped' : 'Total Documents Skipped',
                     'Processed' : 'Total Documents Processed'
                   };
 
-                  var details = [];
-                  for( var key in config )
+                  var document_details = [];
+                  for( var key in document_config )
                   {
-                    var value = parseInt( response.statusMessages[config[key]], 10 );
+                    var value = parseInt( response.statusMessages[document_config[key]], 10 );
 
-                    var detail = '<abbr title="' + config[key].esc() + '">' + key.esc() + '</abbr>: ' +  format_number( value ).esc();
+                    var detail = '<abbr title="' + document_config[key].esc() + '">' + key.esc() + '</abbr>: ' +  format_number( value ).esc();
                     if( elapsed_seconds && 'skipped' !== key.toLowerCase() )
                     {
                       detail += ' <span>(' + format_number( Math.round( value / elapsed_seconds ) ).esc() + '/s)</span>'
                     }
 
-                    details.push( detail );
+                    document_details.push( detail );
                   };
 
-                  details_element
-                    .html( details.join( ', ' ) )
-                    .show();
+                  $( '.docs', details_element )
+                    .html( document_details.join( ', ' ) );
+
+                  // --
+
+                  var dates_config = {
+                      'Started' : 'Full Dump Started',
+                      'Aborted' : 'Aborted',
+                      'Rolledback' : 'Rolledback'
+                  };
+
+                  var dates_details = [];
+                  for( var key in dates_config )
+                  {
+                    var value = response.statusMessages[dates_config[key]];
+
+                    if( value )
+                    {
+                      var detail = '<abbr title="' + dates_config[key].esc() + '">' + key.esc() + '</abbr>: '
+                                 + '<abbr class="time">' +  value.esc() + '</abbr>';
+                      dates_details.push( detail );                      
+                    }
+                  };
+
+                  var dates_element = $( '.dates', details_element );
+
+                  dates_element
+                    .html( dates_details.join( ', ' ) );
+
+                  $( '.time', dates_element )
+                    .removeData( 'timeago' )
+                    .timeago();
                 };
 
                 var get_time_taken = function get_default_time_taken()
@@ -524,22 +557,14 @@ sammy.get
                   );
                 };
 
-                var set_time = function set_time( time_text )
-                {
-                  time_element
-                    .text( time_text )
-                    .removeData( 'timeago' )
-                    .timeago()
-                    .show();
-                }
-
                 state_element
                   .removeAttr( 'class' );
 
-                 time_element
-                    .empty()
-                    .hide();
-                                
+                var current_time = new Date();
+                $( '.last_update abbr', state_element )
+                  .text( current_time.toTimeString().split( ' ' ).shift() )
+                  .attr( 'title', current_time.toUTCString() );
+
                 $( '.info', state_element )
                   .removeClass( 'loader' );
 
@@ -563,26 +588,12 @@ sammy.get
                                 : 'Indexing ...';
 
                   show_full_info( info_text, elapsed_seconds );
-
-                  if( !app.timeout && autorefresh_status )
-                  {
-                    app.timeout = window.setTimeout
-                    (
-                      function()
-                      {
-                        dataimport_fetch_status( true )
-                      },
-                      dataimport_timeout
-                    );
-                  }
                 }
                 else if( rollback_time )
                 {
                   state_element
                     .addClass( 'failure' );
 
-                  set_time( rollback_time );
-
                   show_full_info();
                 }
                 else if( abort_time )
@@ -590,8 +601,6 @@ sammy.get
                   state_element
                     .addClass( 'aborted' );
 
-                  set_time( abort_time );
-
                   show_full_info( 'Aborting current Import ...' );
                 }
                 else if( 'idle' === status && 0 !== messages_count )
@@ -599,12 +608,6 @@ sammy.get
                   state_element
                     .addClass( 'success' );
 
-                  var started_at = response.statusMessages['Full Dump Started'];
-                  if( started_at )
-                  {
-                    set_time( started_at );
-                  }
-
                   show_full_info();
                 }
                 else 
@@ -625,6 +628,18 @@ sammy.get
 
                 $( '#raw_output_container', content_element ).html( code );
                 hljs.highlightBlock( code.get(0) );
+
+                if( !app.timeout && autorefresh_status )
+                {
+                  app.timeout = window.setTimeout
+                  (
+                    function()
+                    {
+                      dataimport_fetch_status( true )
+                    },
+                    dataimport_timeout
+                  );
+                }
               },
               error : function( xhr, text_status, error_thrown )
               {

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/plugins.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/plugins.js?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/plugins.js (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/plugins.js Mon Jan 14 18:54:22 2013
@@ -206,7 +206,7 @@ var render_plugin_data = function( plugi
       }
 
       content += '<li class="' + classes.join( ' ' ) + '">' + "\n";
-      content += '<a href="' + context_path + '?entry=' + bean.esc() + '">';
+      content += '<a href="' + context_path + '?entry=' + bean.esc() + '" data-bean="' + bean.esc() + '">';
       content += '<span>' + bean.esc() + '</span>';
       content += '</a>' + "\n";
       content += '<ul class="detail">' + "\n";
@@ -279,8 +279,48 @@ var render_plugin_data = function( plugi
   frame_element
     .html( content );
 
-  $( 'a[href="' + decodeURIComponent( active_context.path ) + '"]', frame_element )
-    .parent().addClass( 'expanded' );
+  
+  var path = active_context.path.split( '?entry=' );
+  var entries = ( path[1] || '' ).split( ',' );
+  
+  var entry_count = entries.length;
+  for( var i = 0; i < entry_count; i++ )
+  {
+    $( 'a[data-bean="' + entries[i] + '"]', frame_element )
+      .parent().addClass( 'expanded' );
+  }
+
+  $( 'a', frame_element )
+    .off( 'click' )
+    .on
+    (
+      'click',
+      function( event )
+      { 
+        var self = $( this );
+        var bean = self.data( 'bean' );
+
+        var split = '?entry=';
+        var path = active_context.path.split( split );
+        var entry = ( path[1] || '' );
+
+        var regex = new RegExp( bean.replace( /\//g, '\\/' ) + '(,|$)' );
+        var match = regex.test( entry );
+
+        var url = path[0] + split;
+
+        url += match
+             ? entry.replace( regex, '' )
+             : entry + ',' + bean;
+
+        url = url.replace( /=,/, '=' );
+        url = url.replace( /,$/, '' );
+        url = url.replace( /\?entry=$/, '' );
+
+        active_context.redirect( url );
+        return false;
+      }
+    );
   
   // Try to make links for anything with http (but leave the rest alone)
   $( '.detail dd' ).each(function(index) {

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/query.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/query.js?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/query.js (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/query.js Mon Jan 14 18:54:22 2013
@@ -113,27 +113,38 @@ sammy.get
             'submit',
             function( event )
             {
-              var form_map = {};
               var form_values = [];
-              var all_form_values = query_form.formToArray();
-
-              for( var i = 0; i < all_form_values.length; i++ )
+ 
+              var add_to_form_values = function add_to_form_values( fields )
               {
-                if( !all_form_values[i].value || 0 === all_form_values[i].value.length )
-                {
-                  continue;
-                }
-
-                var name_parts = all_form_values[i].name.split( '.' );
-                if( 1 < name_parts.length && !form_map[name_parts[0]] )
-                {
-                  console.debug( 'skip "' + all_form_values[i].name + '", parent missing' );
-                  continue;
-                }
-
-                form_map[all_form_values[i].name] = all_form_values[i].value;
-                form_values.push( all_form_values[i] );
-              }
+                 for( var i in fields )
+                 {
+                  if( !fields[i].value || 0 === fields[i].value.length )
+                  {
+                    continue;
+                  }
+ 
+                  form_values.push( fields[i] );
+                 }
+              };
+ 
+              var fieldsets = $( '> fieldset', query_form );
+ 
+              var fields = fieldsets.first().formToArray();
+              add_to_form_values( fields );
+
+              fieldsets.not( '.common' )
+                .each
+                (
+                  function( i, set )
+                  {
+                    if( $( 'legend input', set ).is( ':checked' ) )
+                    {
+                      var fields = $( set ).formToArray();
+                      add_to_form_values( fields );
+                    }
+                  }
+                );
 
               var handler_path = $( '#qt', query_form ).val();
               if( '/' !== handler_path[0] )
@@ -144,7 +155,13 @@ sammy.get
 
               var query_url = window.location.protocol + '//' + window.location.host
                             + core_basepath + handler_path + '?' + $.param( form_values );
-                            
+
+              var custom_parameters = $( '#custom_parameters', query_form ).val();
+              if( custom_parameters && 0 !== custom_parameters.length )
+              {
+                query_url += '&' + custom_parameters.replace( /^&/, '' ); 
+              }
+
               url_element
                 .attr( 'href', query_url )
                 .text( query_url )

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/tpl/dataimport.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/tpl/dataimport.html?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/tpl/dataimport.html (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/tpl/dataimport.html Mon Jan 14 18:54:22 2013
@@ -22,11 +22,14 @@ limitations under the License.
 
     <div id="current_state">
 
-      <span class="time"></span>
+      <p class="last_update">Last Update: <abbr>Unknown</abbr></p>
       <div class="info">
 
         <strong></strong>
-        <div class="details"></div>
+        <div class="details">
+          <div class="docs"></div>
+          <div class="dates"></div>
+        </div>
 
         <button class="abort-import warn"><span data-aborting="Aborting Import">Abort Import</span></button>
 

Modified: lucene/dev/branches/lucene4547/solr/webapp/web/tpl/query.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/webapp/web/tpl/query.html?rev=1433035&r1=1433034&r2=1433035&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/webapp/web/tpl/query.html (original)
+++ lucene/dev/branches/lucene4547/solr/webapp/web/tpl/query.html Mon Jan 14 18:54:22 2013
@@ -48,8 +48,10 @@ limitations under the License.
           <a rel="help">start</a>,
           <a rel="help">rows</a>
         </label>
-        <input type="text" name="start" id="start" placeholder="0" pattern="[0-9]+" title="Number of leading documents to skip. (Integer)">
-        <input type="text" name="rows" id="rows" placeholder="10" pattern="[0-9]+" title="Number of documents to return after 'start'. (Integer)">
+        <div class="clearfix">
+          <input type="text" name="start" id="start" placeholder="0" pattern="[0-9]+" title="Number of leading documents to skip. (Integer)">
+          <input type="text" name="rows" id="rows" placeholder="10" pattern="[0-9]+" title="Number of documents to return after 'start'. (Integer)">
+        </div>
 
         <label for="fl">
           <a rel="help">fl</a>
@@ -61,6 +63,11 @@ limitations under the License.
         </label>
         <input type="text" name="df" id="df" value="" title="Default search field">
 
+        <label for="custom_parameters">
+          <a rel="help">Raw Query Parameters</a>
+        </label>
+        <input type="text" id="custom_parameters" value="" placeholder="key1=val1&amp;key2=val2">
+
         <label for="wt">
           <a rel="help">wt</a>
         </label>
@@ -160,6 +167,34 @@ limitations under the License.
 
         <label for="edismax_bf">bf</label>
         <input type="text" name="bf" id="edismax_bf" title="Boost function (added).">
+
+        <label for="edismax_uf" title="User Fields">uf</label>
+        <input type="text" name="uf" id="edismax_uf">
+
+        <label for="edismax_pf2" title="bigram phrase boost fields">pf2</label>
+        <input type="text" name="pf2" id="edismax_pf2">
+
+        <label for="edismax_pf3" title="trigram phrase boost fields">pf3</label>
+        <input type="text" name="pf3" id="edismax_pf3">
+
+        <label for="edismax_ps2" title="phrase slop for bigram phrases">ps2</label>
+        <input type="text" name="ps2" id="edismax_ps2">
+
+        <label for="edismax_ps3" title="phrase slop for trigram phrases">ps3</label>
+        <input type="text" name="ps3" id="edismax_ps3">
+
+        <label for="edismax_boost" title="multiplicative boost function">boost</label>
+        <input type="text" name="boost" id="edismax_boost">
+
+        <label for="edismax_stopwords" class="checkbox" title="remove stopwords from mandatory 'matching' component">
+          <input type="checkbox" name="stopwords" id="edismax_stopwords" value="true" checked="checked">
+          stopwords
+        </label>
+
+        <label for="edismax_lowercaseOperators" class="checkbox" title="Enable lower-case 'and' and 'or' as operators">
+          <input type="checkbox" name="lowercaseOperators" id="edismax_lowercaseOperators" value="true" checked="checked">
+          lowercaseOperators
+        </label>
       
         </div>
       </fieldset>