lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r1054507 [4/9] - in /lucene/dev/branches/realtime_search: ./ 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/con...
Date Mon, 03 Jan 2011 00:30:45 GMT
Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java Mon Jan  3 00:30:27 2011
@@ -20,8 +20,6 @@ package org.apache.solr.analysis;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.standard.ClassicTokenizer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.analysis.standard.StandardTokenizer;
-
 import java.io.Reader;
 import java.util.Map;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java Mon Jan  3 00:30:27 2011
@@ -31,7 +31,6 @@ import org.apache.commons.codec.language
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.phonetic.PhoneticFilter;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.util.StrUtils;
 
 /**
  * Create tokens based on phonetic encoders

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/Config.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/Config.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/Config.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/Config.java Mon Jan  3 00:30:27 2011
@@ -33,9 +33,6 @@ import java.io.*;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;
-import java.util.LinkedHashMap;
-import java.util.Collections;
 import java.util.concurrent.atomic.AtomicBoolean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -55,15 +52,6 @@ public class Config {
   private final SolrResourceLoader loader;
 
   /**
-   * @deprecated Use {@link #Config(SolrResourceLoader, String, InputStream, String)} instead. 
-   */
-  @Deprecated
-  public Config(String name, InputStream is, String prefix) throws ParserConfigurationException, IOException, SAXException 
-  {
-    this( null, name, is, prefix );
-  }
-
-  /**
    * Builds a config from a resource name with no xpath prefix.
    * @param loader
    * @param name
@@ -313,55 +301,4 @@ public class Config {
     
     return version;
   }
-
-  // The following functions were moved to ResourceLoader
-  //-----------------------------------------------------------------------------
-  
-   /**
-    * @deprecated Use {@link SolrResourceLoader#getConfigDir()} instead.
-    */
-  @Deprecated
-  public String getConfigDir() {
-    return loader.getConfigDir();
-  }
-
-  /**
-   * @deprecated Use {@link SolrResourceLoader#openResource(String)} instead.
-   */
-  @Deprecated
-  public InputStream openResource(String resource) {
-    return loader.openResource(resource);
-  }
-
-  /**
-   * @deprecated Use {@link SolrResourceLoader#getLines(String)} instead.
-   */
-  @Deprecated
-  public List<String> getLines(String resource) throws IOException {
-    return loader.getLines(resource);
-  }
-
-  /**
-   * @deprecated Use {@link SolrResourceLoader#findClass(String, String[])} instead.
-   */
-  @Deprecated
-  public Class findClass(String cname, String... subpackages) {
-    return loader.findClass(cname, subpackages);
-  }
-
-  /**
-   * @deprecated Use {@link SolrResourceLoader#newInstance(String, String[])} instead.
-   */
-  @Deprecated
-  public Object newInstance(String cname, String ... subpackages) {
-    return loader.newInstance(cname, subpackages);
-  }
-  
-  /**
-   * @deprecated Use {@link SolrResourceLoader#getInstanceDir()} instead.
-   */
-  @Deprecated
-  public String getInstanceDir() {
-    return loader.getInstanceDir();
-  }
 }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java Mon Jan  3 00:30:27 2011
@@ -78,8 +78,6 @@ public class CoreContainer 
   protected String adminHandler;
   protected boolean shareSchema;
   protected String solrHome;
-  @Deprecated
-  protected String solrConfigFilenameOverride;
   protected String defaultCoreName = "";
   private ZkController zkController;
   private SolrZkServer zkServer;
@@ -219,15 +217,6 @@ public class CoreContainer 
            "Setting abortOnConfigurationError==false is no longer supported");
     }
 
-    public String getSolrConfigFilename() {
-      return solrConfigFilename;
-    }
-
-    @Deprecated
-    public void setSolrConfigFilename(String solrConfigFilename) {
-      this.solrConfigFilename = solrConfigFilename;
-    }
-
     // core container instantiation
     public CoreContainer initialize() throws IOException,
         ParserConfigurationException, SAXException {
@@ -379,9 +368,7 @@ public class CoreContainer 
           // deal with optional settings
           String opt = DOMUtil.getAttr(node, "config", null);
 
-          if(solrConfigFilenameOverride != null) {
-            p.setConfigName(solrConfigFilenameOverride);
-          } else if (opt != null) {
+          if (opt != null) {
             p.setConfigName(opt);
           }
           opt = DOMUtil.getAttr(node, "schema", null);

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java Mon Jan  3 00:30:27 2011
@@ -3,7 +3,6 @@ package org.apache.solr.core;
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.lucene.index.IndexFileNameFilter;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrConfig.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrConfig.java Mon Jan  3 00:30:27 2011
@@ -17,6 +17,7 @@
 
 package org.apache.solr.core;
 
+import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.DOMUtil;
 import org.apache.solr.common.util.RegexFileFilter;
 import org.apache.solr.common.util.NamedList;
@@ -70,12 +71,6 @@ public class SolrConfig extends Config {
   
   public static final String DEFAULT_CONF_FILE = "solrconfig.xml";
 
-  /**
-   * Compatibility feature for single-core (pre-solr{215,350} patch); should go away at solr-2.0
-   * @deprecated Use {@link SolrCore#getSolrConfig()} instead.
-   */
-  @Deprecated
-  public static SolrConfig config = null; 
 
   /**
    * Singleton keeping track of configuration errors
@@ -175,8 +170,6 @@ public class SolrConfig extends Config {
 
     hashSetInverseLoadFactor = 1.0f / getFloat("//HashDocSet/@loadFactor",0.75f);
     hashDocSetMaxSize= getInt("//HashDocSet/@maxSize",3000);
-    
-    pingQueryParams = readPingQueryParams(this);
 
     httpCachingConfig = new HttpCachingConfig(this);
     
@@ -210,17 +203,9 @@ public class SolrConfig extends Config {
      loadPluginInfo(IndexReaderFactory.class,"indexReaderFactory",false, true);
      loadPluginInfo(UpdateRequestProcessorChain.class,"updateRequestProcessorChain",false, false);
 
-     //TODO deprecated remove it later
-     loadPluginInfo(SolrHighlighter.class,"highlighting",false, false);
-     if( pluginStore.containsKey( SolrHighlighter.class.getName() ) )
-       log.warn( "Deprecated syntax found. <highlighting/> should move to <searchComponent/>" );
-
      updateHandlerInfo = loadUpdatehandlerInfo();
 
     Config.log.info("Loaded SolrConfig: " + name);
-    
-    // TODO -- at solr 2.0. this should go away
-    config = this;
   }
 
   protected UpdateHandlerInfo loadUpdatehandlerInfo() {
@@ -287,47 +272,6 @@ public class SolrConfig extends Config {
   public HttpCachingConfig getHttpCachingConfig() {
     return httpCachingConfig;
   }
-  
-  /**
-   * ping query request parameters
-   * @deprecated Use {@link PingRequestHandler} instead.
-   */
-  @Deprecated
-  private final NamedList pingQueryParams;
-
-  static private NamedList readPingQueryParams(SolrConfig config) {  
-    String urlSnippet = config.get("admin/pingQuery", "").trim();
-    
-    StringTokenizer qtokens = new StringTokenizer(urlSnippet,"&");
-    String tok;
-    NamedList params = new NamedList();
-    while (qtokens.hasMoreTokens()) {
-      tok = qtokens.nextToken();
-      String[] split = tok.split("=", 2);
-      params.add(split[0], split[1]);
-    }
-    if (0 < params.size()) {
-      log.warn("The <pingQuery> syntax is deprecated, " +
-               "please use PingRequestHandler instead");
-    }
-    return params;
-  }
-  
-  /**
-   * Returns a Request object based on the admin/pingQuery section
-   * of the Solr config file.
-   * 
-   * @deprecated use {@link PingRequestHandler} instead 
-   */
-  @Deprecated
-  public SolrQueryRequest getPingQueryRequest(SolrCore core) {
-    if(pingQueryParams.size() == 0) {
-      throw new IllegalStateException
-        ("<pingQuery> not configured (consider registering " +
-         "PingRequestHandler with the name '/admin/ping' instead)");
-    }
-    return new LocalSolrQueryRequest(core, pingQueryParams);
-  }
 
   public static class JmxConfiguration {
     public boolean enabled = false;
@@ -335,12 +279,6 @@ public class SolrConfig extends Config {
     public String serviceUrl;
     public String rootName;
 
-    @Deprecated
-    public JmxConfiguration(boolean enabled, 
-                            String agentId, 
-                            String serviceUrl) {
-      this(enabled,agentId,serviceUrl,null);
-    }
     public JmxConfiguration(boolean enabled, 
                             String agentId, 
                             String serviceUrl,

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java Mon Jan  3 00:30:27 2011
@@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.store.Directory;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.CommonParams.EchoParamStyle;
 import org.apache.solr.common.params.SolrParams;
@@ -31,7 +30,6 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.handler.admin.ShowFileRequestHandler;
 import org.apache.solr.handler.component.*;
-import org.apache.solr.highlight.DefaultSolrHighlighter;
 import org.apache.solr.highlight.SolrHighlighter;
 import org.apache.solr.request.*;
 import org.apache.solr.response.*;
@@ -107,12 +105,6 @@ public final class SolrCore implements S
 
   public long getStartTime() { return startTime; }
 
-  /**
-   * @deprecated Use {@link CoreContainer#getCore(String)} instead.
-   */
-  @Deprecated
-  private static SolrCore instance;
-
   static int boolean_query_max_clause_count = Integer.MIN_VALUE;
   // only change the BooleanQuery maxClauseCount once for ALL cores...
   void booleanQueryMaxClauseCount()  {
@@ -142,15 +134,7 @@ public final class SolrCore implements S
   public String getConfigResource() {
     return solrConfig.getResourceName();
   }
-  
-  /**
-   * Gets the configuration resource name used by this core instance.
-   * @deprecated Use {@link #getConfigResource()} instead.
-   */
-  @Deprecated
-  public String getConfigFile() {
-    return solrConfig.getResourceName();
-  }
+
   /**
    * Gets the configuration object used by this core instance.
    */
@@ -167,15 +151,6 @@ public final class SolrCore implements S
   }
 
   /**
-   * Gets the schema resource name used by this core instance.
-   * @deprecated Use {@link #getSchemaResource()} instead.
-   */
-  @Deprecated
-  public String getSchemaFile() {
-    return schema.getResourceName();
-  }
-  
-  /**
    * Gets the schema object used by this core instance.
    */
   public IndexSchema getSchema() { 
@@ -465,30 +440,6 @@ public final class SolrCore implements S
     return createInstance(className, UpdateHandler.class, "Update Handler");
   }
   
-
-  /** 
-   * @return the last core initialized.  If you are using multiple cores, 
-   * this is not a function to use.
-   * 
-   * @deprecated Use {@link CoreContainer#getCore(String)} instead.
-   */
-  @Deprecated
-  public static SolrCore getSolrCore() {
-    synchronized( SolrCore.class ) {
-      if( instance == null ) {
-        try {
-          // sets 'instance' to the latest solr core          
-          CoreContainer.Initializer init = new CoreContainer.Initializer();
-          instance = init.initialize().getCore("");
-        } catch(Exception xany) {
-          throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,
-              "error creating core", xany );
-        }
-      }
-    }
-    return instance;
-  }
-  
   /**
    * 
    * @param dataDir
@@ -557,7 +508,7 @@ public final class SolrCore implements S
     initQParsers();
     initValueSourceParsers();
 
-    this.searchComponents = loadSearchComponents();
+    this.searchComponents = Collections.unmodifiableMap(loadSearchComponents());
 
     // Processors initialized before the handlers
     updateProcessorChains = loadUpdateProcessorChains();
@@ -594,7 +545,6 @@ public final class SolrCore implements S
       // Finally tell anyone who wants to know
       resourceLoader.inform( resourceLoader );
       resourceLoader.inform( this );  // last call before the latch is released.
-      instance = this;   // set singleton for backwards compatibility
     } catch (IOException e) {
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, null, e, false);
     } finally {
@@ -770,16 +720,7 @@ public final class SolrCore implements S
      closeHooks.add( hook );
    }
 
-  /**
-   * Returns a Request object based on the admin/pingQuery section
-   * of the Solr config file.
-   * 
-   * @deprecated use {@link org.apache.solr.handler.PingRequestHandler} instead
-   */
-  @Deprecated
-  public SolrQueryRequest getPingQueryRequest() {
-    return solrConfig.getPingQueryRequest(this);
-  }
+
   ////////////////////////////////////////////////////////////////////////////////
   // Request Handler
   ////////////////////////////////////////////////////////////////////////////////
@@ -807,14 +748,6 @@ public final class SolrCore implements S
     return reqHandlers.getRequestHandlers();
   }
 
-  /**
-   * Get the SolrHighlighter
-   */
-  @Deprecated
-  public SolrHighlighter getHighlighter() {
-    HighlightComponent hl = (HighlightComponent) searchComponents.get(HighlightComponent.COMPONENT_NAME);
-    return hl==null? null: hl.getHighlighter();
-  }
 
   /**
    * Registers a handler at the specified location.  If one exists there, it will be replaced.
@@ -894,7 +827,7 @@ public final class SolrCore implements S
    * @return An unmodifiable Map of Search Components
    */
   public Map<String, SearchComponent> getSearchComponents() {
-    return Collections.unmodifiableMap(searchComponents);
+    return searchComponents;
   }
 
   ////////////////////////////////////////////////////////////////////////////////
@@ -1375,18 +1308,7 @@ public final class SolrCore implements S
 
   }
 
-  /**
-   * @deprecated Use {@link #execute(SolrRequestHandler, SolrQueryRequest, SolrQueryResponse)} instead. 
-   */
-  @Deprecated
-  public void execute(SolrQueryRequest req, SolrQueryResponse rsp) {
-    SolrRequestHandler handler = getRequestHandler(req.getQueryType());
-    if (handler==null) {
-      log.warn(logid+"Unknown Request Handler '" + req.getQueryType() +"' :" + req);
-      throw new SolrException( SolrException.ErrorCode.BAD_REQUEST,"Unknown Request Handler '" + req.getQueryType() + "'", true);
-    }
-    execute(handler, req, rsp);
-  }
+
   
   public static void setResponseHeaderValues(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryResponse rsp) {
     // TODO should check that responseHeader has not been replaced by handler

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrEventListener.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrEventListener.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrEventListener.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrEventListener.java Mon Jan  3 00:30:27 2011
@@ -17,7 +17,6 @@
 
 package org.apache.solr.core;
 
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.util.plugin.NamedListInitializedPlugin;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java Mon Jan  3 00:30:27 2011
@@ -278,6 +278,8 @@ public class SolrResourceLoader implemen
       }
       // delegate to the class loader (looking into $INSTANCE_DIR/lib jars)
       is = classLoader.getResourceAsStream(resource);
+      if (is == null)
+        is = classLoader.getResourceAsStream(getConfigDir() + resource);
     } catch (Exception e) {
       throw new RuntimeException("Error opening " + resource, e);
     }
@@ -634,10 +636,7 @@ public class SolrResourceLoader implemen
     }
     return normalizeDir( home );
   }
-  @Deprecated
-  public static String locateInstanceDir() {
-    return locateSolrHome();
-  }
+
 
   public String getInstanceDir() {
     return instanceDir;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java Mon Jan  3 00:30:27 2011
@@ -20,7 +20,6 @@ import java.io.IOException;
 
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.store.Directory;
-import org.apache.solr.common.util.NamedList;
 
 /**
  * Default IndexReaderFactory implementation. Returns a standard Lucene

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -62,7 +62,7 @@ public class BinaryUpdateRequestHandler 
     };
   }
 
-  private void parseAndLoadDocs(SolrQueryRequest req, SolrQueryResponse rsp, InputStream stream,
+  private void parseAndLoadDocs(final SolrQueryRequest req, SolrQueryResponse rsp, InputStream stream,
                                 final UpdateRequestProcessor processor) throws IOException {
     UpdateRequest update = null;
     update = new JavaBinUpdateRequestCodec().unmarshal(stream,
@@ -71,7 +71,7 @@ public class BinaryUpdateRequestHandler 
 
               public void document(SolrInputDocument document, UpdateRequest updateRequest) {
                 if (addCmd == null) {
-                  addCmd = getAddCommand(updateRequest.getParams());
+                  addCmd = getAddCommand(req, updateRequest.getParams());
                 }
                 addCmd.solrDoc = document;
                 try {
@@ -83,48 +83,30 @@ public class BinaryUpdateRequestHandler 
               }
             });
     if (update.getDeleteById() != null) {
-      delete(update.getDeleteById(), processor, true);
+      delete(req, update.getDeleteById(), processor, true);
     }
     if (update.getDeleteQuery() != null) {
-      delete(update.getDeleteQuery(), processor, false);
+      delete(req, update.getDeleteQuery(), processor, false);
     }
 
   }
 
-  private AddUpdateCommand getAddCommand(SolrParams params) {
-    AddUpdateCommand addCmd = new AddUpdateCommand();
-    boolean overwrite = true;  // the default
+  private AddUpdateCommand getAddCommand(SolrQueryRequest req, SolrParams params) {
+    AddUpdateCommand addCmd = new AddUpdateCommand(req);
 
-    Boolean overwritePending = null;
-    Boolean overwriteCommitted = null;
-
-
-    overwrite = params.getBool(UpdateParams.OVERWRITE, overwrite);
+    addCmd.overwrite = params.getBool(UpdateParams.OVERWRITE, true);
     addCmd.commitWithin = params.getInt(COMMIT_WITHIN, -1);
-    // check if these flags are set
-    if (overwritePending != null && overwriteCommitted != null) {
-      if (overwritePending != overwriteCommitted) {
-        throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                "can't have different values for 'overwritePending' and 'overwriteCommitted'");
-      }
-      overwrite = overwritePending;
-    }
-    addCmd.overwriteCommitted = overwrite;
-    addCmd.overwritePending = overwrite;
-    addCmd.allowDups = !overwrite;
     return addCmd;
   }
 
-  private void delete(List<String> l, UpdateRequestProcessor processor, boolean isId) throws IOException {
+  private void delete(SolrQueryRequest req, List<String> l, UpdateRequestProcessor processor, boolean isId) throws IOException {
     for (String s : l) {
-      DeleteUpdateCommand delcmd = new DeleteUpdateCommand();
+      DeleteUpdateCommand delcmd = new DeleteUpdateCommand(req);
       if (isId) {
         delcmd.id = s;
       } else {
         delcmd.query = s;
       }
-      delcmd.fromCommitted = true;
-      delcmd.fromPending = true;
       processor.processDelete(delcmd);
     }
   }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -185,20 +185,8 @@ abstract class CSVLoader extends Content
     this.params = req.getParams();
     schema = req.getSchema();
 
-    templateAdd = new AddUpdateCommand();
-    templateAdd.allowDups=false;
-    templateAdd.overwriteCommitted=true;
-    templateAdd.overwritePending=true;
-
-    if (params.getBool(OVERWRITE,true)) {
-      templateAdd.allowDups=false;
-      templateAdd.overwriteCommitted=true;
-      templateAdd.overwritePending=true;
-    } else {
-      templateAdd.allowDups=true;
-      templateAdd.overwriteCommitted=false;
-      templateAdd.overwritePending=false;
-    }
+    templateAdd = new AddUpdateCommand(req);
+    templateAdd.overwrite=params.getBool(OVERWRITE,true);
 
     strategy = new CSVStrategy(',', '"', CSVStrategy.COMMENTS_DISABLED, CSVStrategy.ESCAPE_DISABLED, false, false, false, true);
     String sep = params.get(SEPARATOR);

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java Mon Jan  3 00:30:27 2011
@@ -45,7 +45,7 @@ public abstract class ContentStreamHandl
 
       Iterable<ContentStream> streams = req.getContentStreams();
       if (streams == null) {
-        if (!RequestHandlerUtils.handleCommit(processor, params, false) && !RequestHandlerUtils.handleRollback(processor, params, false)) {
+        if (!RequestHandlerUtils.handleCommit(req, processor, params, false) && !RequestHandlerUtils.handleRollback(req, processor, params, false)) {
           throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "missing content stream");
         }
       } else {
@@ -55,8 +55,8 @@ public abstract class ContentStreamHandl
         }
 
         // Perhaps commit from the parameters
-        RequestHandlerUtils.handleCommit(processor, params, false);
-        RequestHandlerUtils.handleRollback(processor, params, false);
+        RequestHandlerUtils.handleCommit(req, processor, params, false);
+        RequestHandlerUtils.handleRollback(req, processor, params, false);
       }
     } finally {
       // finish the request

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/JsonLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/JsonLoader.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/JsonLoader.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/JsonLoader.java Mon Jan  3 00:30:27 2011
@@ -62,14 +62,14 @@ class JsonLoader extends ContentStreamLo
       }
 
       JSONParser parser = new JSONParser(reader);
-      this.processUpdate(processor, parser);
+      this.processUpdate(req, processor, parser);
     }
     finally {
       IOUtils.closeQuietly(reader);
     }
   }
 
-  void processUpdate(UpdateRequestProcessor processor, JSONParser parser) throws IOException 
+  void processUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, JSONParser parser) throws IOException 
   {
     int ev = parser.nextEvent();
     while( ev != JSONParser.EOF ) {
@@ -80,25 +80,25 @@ class JsonLoader extends ContentStreamLo
         if( parser.wasKey() ) {
           String v = parser.getString();
           if( v.equals( XmlUpdateRequestHandler.ADD ) ) {
-            processor.processAdd( parseAdd( parser ) );
+            processor.processAdd( parseAdd(req, parser ) );
           }
           else if( v.equals( XmlUpdateRequestHandler.COMMIT ) ) {
-            CommitUpdateCommand cmd = new CommitUpdateCommand( false );
+            CommitUpdateCommand cmd = new CommitUpdateCommand(req,  false );
             cmd.waitFlush = cmd.waitSearcher = true;
             parseCommitOptions( parser, cmd );
             processor.processCommit( cmd );
           }
           else if( v.equals( XmlUpdateRequestHandler.OPTIMIZE ) ) {
-            CommitUpdateCommand cmd = new CommitUpdateCommand( true );
+            CommitUpdateCommand cmd = new CommitUpdateCommand(req, true );
             cmd.waitFlush = cmd.waitSearcher = true;
             parseCommitOptions( parser, cmd );
             processor.processCommit( cmd );
           }
           else if( v.equals( XmlUpdateRequestHandler.DELETE ) ) {
-            processor.processDelete( parseDelete( parser ) );
+            processor.processDelete( parseDelete(req, parser ) );
           }
           else if( v.equals( XmlUpdateRequestHandler.ROLLBACK ) ) {
-            processor.processRollback( parseRollback( parser ) );
+            processor.processRollback( parseRollback(req, parser ) );
           }
           else {
             throw new IOException( "Unknown command: "+v+" ["+parser.getPosition()+"]" );
@@ -129,11 +129,10 @@ class JsonLoader extends ContentStreamLo
     }
   }
 
-  DeleteUpdateCommand parseDelete(JSONParser js) throws IOException {
+  DeleteUpdateCommand parseDelete(SolrQueryRequest req, JSONParser js) throws IOException {
     assertNextEvent( js, JSONParser.OBJECT_START );
 
-    DeleteUpdateCommand cmd = new DeleteUpdateCommand();
-    cmd.fromCommitted = cmd.fromPending = true; // TODO? enable this?
+    DeleteUpdateCommand cmd = new DeleteUpdateCommand(req);
     
     while( true ) {
       int ev = js.nextEvent();
@@ -170,10 +169,10 @@ class JsonLoader extends ContentStreamLo
     }
   }
   
-  RollbackUpdateCommand parseRollback(JSONParser js) throws IOException {
+  RollbackUpdateCommand parseRollback(SolrQueryRequest req, JSONParser js) throws IOException {
     assertNextEvent( js, JSONParser.OBJECT_START );
     assertNextEvent( js, JSONParser.OBJECT_END );
-    return new RollbackUpdateCommand();
+    return new RollbackUpdateCommand(req);
   }
 
   void parseCommitOptions( JSONParser js, CommitUpdateCommand cmd ) throws IOException
@@ -212,11 +211,10 @@ class JsonLoader extends ContentStreamLo
     }
   }
   
-  AddUpdateCommand parseAdd( JSONParser js ) throws IOException
+  AddUpdateCommand parseAdd(SolrQueryRequest req, JSONParser js ) throws IOException
   {
     assertNextEvent( js, JSONParser.OBJECT_START );
-    AddUpdateCommand cmd = new AddUpdateCommand();
-    cmd.allowDups = false;
+    AddUpdateCommand cmd = new AddUpdateCommand(req);
     float boost = 1.0f;
     
     while( true ) {
@@ -232,7 +230,7 @@ class JsonLoader extends ContentStreamLo
             cmd.solrDoc = parseDoc( ev, js );
           }
           else if( XmlUpdateRequestHandler.OVERWRITE.equals( key ) ) {
-            cmd.allowDups = !js.getBoolean(); // reads next boolean
+            cmd.overwrite = js.getBoolean(); // reads next boolean
           }
           else if( XmlUpdateRequestHandler.COMMIT_WITHIN.equals( key ) ) {
             cmd.commitWithin = (int)js.getLong(); 
@@ -255,8 +253,6 @@ class JsonLoader extends ContentStreamLo
           throw new IOException("missing solr document. "+js.getPosition() );
         }
         cmd.solrDoc.setDocumentBoost( boost ); 
-        cmd.overwriteCommitted = !cmd.allowDups;
-        cmd.overwritePending = !cmd.allowDups;
         return cmd;
       }
       else {

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java Mon Jan  3 00:30:27 2011
@@ -24,11 +24,9 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Comparator;
 
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.regex.Pattern;
 
 import org.apache.lucene.document.Document;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java Mon Jan  3 00:30:27 2011
@@ -18,7 +18,6 @@
 package org.apache.solr.handler;
 
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
@@ -27,7 +26,6 @@ import org.apache.solr.core.SolrInfoMBea
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrRequestHandler;
 import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.search.DocSet;
 import org.apache.solr.util.SolrPluginUtils;
 import org.apache.lucene.queryParser.ParseException;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java Mon Jan  3 00:30:27 2011
@@ -65,7 +65,7 @@ public class RequestHandlerUtils
     boolean commit   = params.getBool( UpdateParams.COMMIT,   false );
     
     if( optimize || commit || force ) {
-      CommitUpdateCommand cmd = new CommitUpdateCommand( optimize );
+      CommitUpdateCommand cmd = new CommitUpdateCommand(req, optimize );
       cmd.waitFlush    = params.getBool( UpdateParams.WAIT_FLUSH,    cmd.waitFlush    );
       cmd.waitSearcher = params.getBool( UpdateParams.WAIT_SEARCHER, cmd.waitSearcher );
       cmd.expungeDeletes = params.getBool( UpdateParams.EXPUNGE_DELETES, cmd.expungeDeletes);
@@ -89,7 +89,7 @@ public class RequestHandlerUtils
    * Check the request parameters and decide if it should commit or optimize.
    * If it does, it will check parameters for "waitFlush" and "waitSearcher"
    */
-  public static boolean handleCommit( UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
+  public static boolean handleCommit(SolrQueryRequest req, UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
   {
     if( params == null ) {
       params = new MapSolrParams( new HashMap<String, String>() ); 
@@ -99,7 +99,7 @@ public class RequestHandlerUtils
     boolean commit   = params.getBool( UpdateParams.COMMIT,   false );
     
     if( optimize || commit || force ) {
-      CommitUpdateCommand cmd = new CommitUpdateCommand( optimize );
+      CommitUpdateCommand cmd = new CommitUpdateCommand(req, optimize );
       cmd.waitFlush    = params.getBool( UpdateParams.WAIT_FLUSH,    cmd.waitFlush    );
       cmd.waitSearcher = params.getBool( UpdateParams.WAIT_SEARCHER, cmd.waitSearcher );
       cmd.expungeDeletes = params.getBool( UpdateParams.EXPUNGE_DELETES, cmd.expungeDeletes);      
@@ -113,7 +113,7 @@ public class RequestHandlerUtils
   /**
    * @since Solr 1.4
    */
-  public static boolean handleRollback( UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
+  public static boolean handleRollback(SolrQueryRequest req, UpdateRequestProcessor processor, SolrParams params, boolean force ) throws IOException
   {
     if( params == null ) {
       params = new MapSolrParams( new HashMap<String, String>() ); 
@@ -122,7 +122,7 @@ public class RequestHandlerUtils
     boolean rollback = params.getBool( UpdateParams.ROLLBACK, false );
     
     if( rollback || force ) {
-      RollbackUpdateCommand cmd = new RollbackUpdateCommand();
+      RollbackUpdateCommand cmd = new RollbackUpdateCommand(req);
       processor.processRollback( cmd );
       return true;
     }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapPuller.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapPuller.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapPuller.java Mon Jan  3 00:30:27 2011
@@ -22,12 +22,16 @@ import org.apache.commons.httpclient.met
 import org.apache.commons.io.IOUtils;
 import org.apache.lucene.index.IndexCommit;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.FastInputStream;
 import org.apache.solr.common.util.JavaBinCodec;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.FileUtils;
 import org.apache.solr.core.SolrCore;
 import static org.apache.solr.handler.ReplicationHandler.*;
+
+import org.apache.solr.request.LocalSolrQueryRequest;
+import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.update.CommitUpdateCommand;
 import org.apache.solr.update.DirectUpdateHandler2;
@@ -461,18 +465,23 @@ public class SnapPuller {
   }
 
   private void doCommit() throws IOException {
-    CommitUpdateCommand cmd = new CommitUpdateCommand(false);
-    cmd.waitFlush = true;
-    cmd.waitSearcher = true;
-    solrCore.getUpdateHandler().commit(cmd);
-    if (solrCore.getUpdateHandler() instanceof DirectUpdateHandler2) {
-      LOG.info("Force open index writer to make sure older index files get deleted");
-      DirectUpdateHandler2 handler = (DirectUpdateHandler2) solrCore.getUpdateHandler();
-      handler.forceOpenWriter();
-      replicationHandler.refreshCommitpoint();
-    } else  {
-      LOG.warn("The update handler is not an instance or sub-class of DirectUpdateHandler2. " +
-              "ReplicationHandler may not be able to cleanup un-used index files.");
+    SolrQueryRequest req = new LocalSolrQueryRequest(solrCore, new ModifiableSolrParams());
+    try {
+      CommitUpdateCommand cmd = new CommitUpdateCommand(req, false);
+      cmd.waitFlush = true;
+      cmd.waitSearcher = true;
+      solrCore.getUpdateHandler().commit(cmd);
+      if (solrCore.getUpdateHandler() instanceof DirectUpdateHandler2) {
+        LOG.info("Force open index writer to make sure older index files get deleted");
+        DirectUpdateHandler2 handler = (DirectUpdateHandler2) solrCore.getUpdateHandler();
+        handler.forceOpenWriter();
+        replicationHandler.refreshCommitpoint();
+      } else  {
+        LOG.warn("The update handler is not an instance or sub-class of DirectUpdateHandler2. " +
+            "ReplicationHandler may not be able to cleanup un-used index files.");
+      }
+    } finally {
+      req.close();
     }
   }
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -17,7 +17,6 @@
 
 package org.apache.solr.handler;
 
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.component.*;
 
 import java.net.MalformedURLException;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XMLLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XMLLoader.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XMLLoader.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XMLLoader.java Mon Jan  3 00:30:27 2011
@@ -66,7 +66,7 @@ class XMLLoader extends ContentStreamLoa
       }
 
       XMLStreamReader parser = inputFactory.createXMLStreamReader(reader);
-      this.processUpdate(processor, parser);
+      this.processUpdate(req, processor, parser);
     }
     catch (XMLStreamException e) {
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e.getMessage(), e);
@@ -81,7 +81,7 @@ class XMLLoader extends ContentStreamLoa
   /**
    * @since solr 1.2
    */
-  void processUpdate(UpdateRequestProcessor processor, XMLStreamReader parser)
+  void processUpdate(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser)
           throws XMLStreamException, IOException, FactoryConfigurationError,
           InstantiationException, IllegalAccessException,
           TransformerConfigurationException {
@@ -98,40 +98,20 @@ class XMLLoader extends ContentStreamLoa
           if (currTag.equals(XmlUpdateRequestHandler.ADD)) {
             XmlUpdateRequestHandler.log.trace("SolrCore.update(add)");
 
-            addCmd = new AddUpdateCommand();
-            boolean overwrite = true;  // the default
+            addCmd = new AddUpdateCommand(req);
 
-            Boolean overwritePending = null;
-            Boolean overwriteCommitted = null;
             for (int i = 0; i < parser.getAttributeCount(); i++) {
               String attrName = parser.getAttributeLocalName(i);
               String attrVal = parser.getAttributeValue(i);
               if (XmlUpdateRequestHandler.OVERWRITE.equals(attrName)) {
-                overwrite = StrUtils.parseBoolean(attrVal);
-              } else if (XmlUpdateRequestHandler.ALLOW_DUPS.equals(attrName)) {
-                overwrite = !StrUtils.parseBoolean(attrVal);
+                addCmd.overwrite = StrUtils.parseBoolean(attrVal);
               } else if (XmlUpdateRequestHandler.COMMIT_WITHIN.equals(attrName)) {
                 addCmd.commitWithin = Integer.parseInt(attrVal);
-              } else if (XmlUpdateRequestHandler.OVERWRITE_PENDING.equals(attrName)) {
-                overwritePending = StrUtils.parseBoolean(attrVal);
-              } else if (XmlUpdateRequestHandler.OVERWRITE_COMMITTED.equals(attrName)) {
-                overwriteCommitted = StrUtils.parseBoolean(attrVal);
               } else {
                 XmlUpdateRequestHandler.log.warn("Unknown attribute id in add:" + attrName);
               }
             }
 
-            // check if these flags are set
-            if (overwritePending != null && overwriteCommitted != null) {
-              if (overwritePending != overwriteCommitted) {
-                throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                        "can't have different values for 'overwritePending' and 'overwriteCommitted'");
-              }
-              overwrite = overwritePending;
-            }
-            addCmd.overwriteCommitted = overwrite;
-            addCmd.overwritePending = overwrite;
-            addCmd.allowDups = !overwrite;
           } else if ("doc".equals(currTag)) {
             XmlUpdateRequestHandler.log.trace("adding doc...");
             addCmd.clear();
@@ -140,7 +120,7 @@ class XMLLoader extends ContentStreamLoa
           } else if (XmlUpdateRequestHandler.COMMIT.equals(currTag) || XmlUpdateRequestHandler.OPTIMIZE.equals(currTag)) {
             XmlUpdateRequestHandler.log.trace("parsing " + currTag);
 
-            CommitUpdateCommand cmd = new CommitUpdateCommand(XmlUpdateRequestHandler.OPTIMIZE.equals(currTag));
+            CommitUpdateCommand cmd = new CommitUpdateCommand(req, XmlUpdateRequestHandler.OPTIMIZE.equals(currTag));
 
             boolean sawWaitSearcher = false, sawWaitFlush = false;
             for (int i = 0; i < parser.getAttributeCount(); i++) {
@@ -171,13 +151,13 @@ class XMLLoader extends ContentStreamLoa
           else if (XmlUpdateRequestHandler.ROLLBACK.equals(currTag)) {
             XmlUpdateRequestHandler.log.trace("parsing " + currTag);
 
-            RollbackUpdateCommand cmd = new RollbackUpdateCommand();
+            RollbackUpdateCommand cmd = new RollbackUpdateCommand(req);
 
             processor.processRollback(cmd);
           } // end rollback
           else if (XmlUpdateRequestHandler.DELETE.equals(currTag)) {
             XmlUpdateRequestHandler.log.trace("parsing delete");
-            processDelete(processor, parser);
+            processDelete(req, processor, parser);
           } // end delete
           break;
       }
@@ -187,18 +167,17 @@ class XMLLoader extends ContentStreamLoa
   /**
    * @since solr 1.3
    */
-  void processDelete(UpdateRequestProcessor processor, XMLStreamReader parser) throws XMLStreamException, IOException {
+  void processDelete(SolrQueryRequest req, UpdateRequestProcessor processor, XMLStreamReader parser) throws XMLStreamException, IOException {
     // Parse the command
-    DeleteUpdateCommand deleteCmd = new DeleteUpdateCommand();
-    deleteCmd.fromPending = true;
-    deleteCmd.fromCommitted = true;
+    DeleteUpdateCommand deleteCmd = new DeleteUpdateCommand(req);
+
     for (int i = 0; i < parser.getAttributeCount(); i++) {
       String attrName = parser.getAttributeLocalName(i);
       String attrVal = parser.getAttributeValue(i);
       if ("fromPending".equals(attrName)) {
-        deleteCmd.fromPending = StrUtils.parseBoolean(attrVal);
+        // deprecated
       } else if ("fromCommitted".equals(attrName)) {
-        deleteCmd.fromCommitted = StrUtils.parseBoolean(attrVal);
+        // deprecated
       } else {
         XmlUpdateRequestHandler.log.warn("unexpected attribute delete/@" + attrName);
       }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -18,14 +18,11 @@
 package org.apache.solr.handler;
 
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.params.MapSolrParams;
-import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.XML;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.request.SolrQueryRequestBase;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.update.processor.UpdateRequestProcessor;
 import org.apache.solr.update.processor.UpdateRequestProcessorChain;
@@ -57,24 +54,7 @@ public class XmlUpdateRequestHandler ext
 
   public static final String OVERWRITE = "overwrite";
   public static final String COMMIT_WITHIN = "commitWithin";
-  
-  /**
-   * @deprecated use {@link #OVERWRITE}
-   */
-  @Deprecated
-  public static final String OVERWRITE_COMMITTED = "overwriteCommitted";
-  
-  /**
-   * @deprecated use {@link #OVERWRITE}
-   */
-  @Deprecated
-  public static final String OVERWRITE_PENDING = "overwritePending";
-
-  /**
-   * @deprecated use {@link #OVERWRITE}
-   */
-  @Deprecated
-  public static final String ALLOW_DUPS = "allowDups";
+
 
   XMLInputFactory inputFactory;
 
@@ -104,47 +84,6 @@ public class XmlUpdateRequestHandler ext
     return new XMLLoader(processor, inputFactory);
   }
 
-
-  /**
-   * A Convenience method for getting back a simple XML string indicating
-   * success or failure from an XML formated Update (from the Reader)
-   *
-   * @since solr 1.2
-   * @deprecated Direct updates fro ma Reader, as well as the response 
-   *             format produced by this method, have been deprecated 
-   *             and will be removed in future versions.  Any code using
-   *             this method should be changed to use {@link #handleRequest} 
-   *             method with a ContentStream. 
-   */
-  @Deprecated
-  public void doLegacyUpdate(Reader input, Writer output) {
-    SolrCore core = SolrCore.getSolrCore();
-    SolrQueryRequest req = new LocalSolrQueryRequest(core, new HashMap<String,String[]>());
-
-    try {
-      // Old style requests do not choose a custom handler
-      UpdateRequestProcessorChain processorFactory = core.getUpdateProcessingChain(null);
-
-      SolrQueryResponse rsp = new SolrQueryResponse(); // ignored
-      XMLStreamReader parser = inputFactory.createXMLStreamReader(input);
-      UpdateRequestProcessor processor = processorFactory.createProcessor(req, rsp);
-      XMLLoader loader = (XMLLoader) newLoader(req, processor);
-      loader.processUpdate(processor, parser);
-      processor.finish();
-      output.write("<result status=\"0\"></result>");
-    }
-    catch (Exception ex) {
-      try {
-        SolrException.logOnce(log, "Error processing \"legacy\" update command", ex);
-        XML.writeXML(output, "result", SolrException.toStr(ex), "status", "1");
-      } catch (Exception ee) {
-        log.error("Error writing to output stream: " + ee);
-      }
-    }
-    finally {
-      req.close();
-    }
-  }
   //////////////////////// SolrInfoMBeans methods //////////////////////
 
   @Override

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java Mon Jan  3 00:30:27 2011
@@ -42,9 +42,7 @@ import org.apache.lucene.store.Directory
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.Date;
-import java.util.Set;
 
 /**
  * @version $Id$
@@ -196,7 +194,7 @@ public class CoreAdminHandler extends Re
         wrappedReq = new LocalSolrQueryRequest(core, req.getParams());
         UpdateRequestProcessor processor =
                 processorChain.createProcessor(wrappedReq, rsp);
-        processor.processMergeIndexes(new MergeIndexesCommand(dirs));
+        processor.processMergeIndexes(new MergeIndexesCommand(dirs, req));
       } finally {
         core.close();
         wrappedReq.close();

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -450,7 +450,7 @@ public class LukeRequestHandler extends 
       if (ft.getAnalyzer().getPositionIncrementGap(f.getName()) != 0) {
     	  field.add("positionIncrementGap", ft.getAnalyzer().getPositionIncrementGap(f.getName()));
       }
-      field.add("copyDests", schema.getCopyFields(f.getName()));
+      field.add("copyDests", schema.getCopyFieldsList(f.getName()));
       field.add("copySources", schema.getCopySources(f.getName()));
 
       

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java Mon Jan  3 00:30:27 2011
@@ -26,7 +26,6 @@ import org.apache.solr.common.util.Simpl
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrInfoMBean;
 import org.apache.solr.handler.RequestHandlerBase;
-import org.apache.solr.handler.RequestHandlerUtils;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java Mon Jan  3 00:30:27 2011
@@ -20,6 +20,7 @@ package org.apache.solr.handler.admin;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URISyntaxException;
 import java.util.Date;
 import java.util.HashSet;
 import java.util.Locale;
@@ -36,7 +37,6 @@ import org.apache.solr.common.util.Simpl
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrResourceLoader;
 import org.apache.solr.handler.RequestHandlerBase;
-import org.apache.solr.handler.RequestHandlerUtils;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.RawResponseWriter;
 import org.apache.solr.response.SolrQueryResponse;
@@ -123,7 +123,15 @@ public class ShowFileRequestHandler exte
     File adminFile = null;
     
     final SolrResourceLoader loader = req.getCore().getResourceLoader();
-    File configdir = new File( loader.getConfigDir() ); 
+    File configdir = new File( loader.getConfigDir() );
+    if (!configdir.exists()) {
+      // TODO: maybe we should just open it this way to start with?
+      try {
+        configdir = new File( loader.getClassLoader().getResource(loader.getConfigDir()).toURI() );
+      } catch (URISyntaxException e) {
+        throw new SolrException( ErrorCode.FORBIDDEN, "Can not access configuration directory!");
+      }
+    }
     String fname = req.getParams().get("file", null);
     if( fname == null ) {
       adminFile = configdir;
@@ -192,12 +200,8 @@ public class ShowFileRequestHandler exte
    * 
    * It is only used so that we can get rid of "/admin/get-file.jsp" and include
    * "admin-extra.html" in "/admin/index.html" using jsp scriptlets
-   * 
-   * @deprecated This functionality is implemented in
-   *             {@link #handleRequestBody(SolrQueryRequest, SolrQueryResponse)}.
    */
-  @Deprecated
-  public static String getFileContents( String path )
+  public static String getFileContents(SolrCore core, String path )
   {
     if( instance != null && instance.hiddenFiles != null ) {
       if( instance.hiddenFiles.contains( path ) ) {
@@ -205,7 +209,6 @@ public class ShowFileRequestHandler exte
       }
     }
     try {
-      SolrCore core = SolrCore.getSolrCore();
       InputStream input = core.getResourceLoader().openResource(path);
       return IOUtils.toString( input );
     }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java Mon Jan  3 00:30:27 2011
@@ -8,11 +8,9 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.response.SolrQueryResponse;
 
-import java.util.Date;
 import java.util.Set;
 import java.util.Map;
 import java.util.HashSet;
-import java.util.HashMap;
 
 /**
  * A request handler that provides info about all 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java Mon Jan  3 00:30:27 2011
@@ -20,7 +20,6 @@ package org.apache.solr.handler.admin;
 import java.io.BufferedReader;
 import java.io.DataInputStream;
 import java.io.File;
-import java.io.StringWriter;
 import java.lang.management.ManagementFactory;
 import java.lang.management.OperatingSystemMXBean;
 import java.lang.management.RuntimeMXBean;
@@ -35,7 +34,6 @@ import org.apache.commons.io.IOUtils;
 import org.apache.lucene.LucenePackage;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
-import org.apache.solr.common.util.XML;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.RequestHandlerBase;
 import org.apache.solr.request.SolrQueryRequest;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java Mon Jan  3 00:30:27 2011
@@ -25,7 +25,6 @@ import java.lang.management.ThreadMXBean
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.handler.RequestHandlerBase;
-import org.apache.solr.handler.RequestHandlerUtils;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java Mon Jan  3 00:30:27 2011
@@ -50,6 +50,10 @@ public class HighlightComponent extends 
   private PluginInfo info = PluginInfo.EMPTY_INFO;
   private SolrHighlighter highlighter;
 
+  public static SolrHighlighter getHighlighter(SolrCore core) {
+    HighlightComponent hl = (HighlightComponent) core.getSearchComponents().get(HighlightComponent.COMPONENT_NAME);
+    return hl==null ? null: hl.getHighlighter();    
+  }
 
   public void init(PluginInfo info) {
     this.info = info;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java Mon Jan  3 00:30:27 2011
@@ -32,9 +32,6 @@ import org.apache.solr.request.SolrQuery
 import org.apache.solr.schema.FieldType;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.Field.Index;
-import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.index.Term;
 
 import java.io.IOException;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryComponent.java Mon Jan  3 00:30:27 2011
@@ -527,8 +527,7 @@ public class QueryComponent extends Sear
     SolrQueryResponse rsp = rb.rsp;
     //pre-fetch returned documents
     if (!req.getParams().getBool(ShardParams.IS_SHARD,false) && rb.getResults().docList != null && rb.getResults().docList.size()<=50) {
-      // TODO: this may depend on the highlighter component (or other components?)
-      SolrPluginUtils.optimizePreFetchDocs(rb.getResults().docList, rb.getQuery(), req, rsp);
+      SolrPluginUtils.optimizePreFetchDocs(rb, rb.getResults().docList, rb.getQuery(), req, rsp);
     }
   }
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java Mon Jan  3 00:30:27 2011
@@ -30,7 +30,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
 
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.QueryElevationParams;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchComponent.java Mon Jan  3 00:30:27 2011
@@ -20,12 +20,9 @@ package org.apache.solr.handler.componen
 import java.io.IOException;
 import java.net.URL;
 
-import org.apache.lucene.queryParser.ParseException;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.core.SolrInfoMBean;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.util.plugin.NamedListInitializedPlugin;
 
 /**

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchHandler.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SearchHandler.java Mon Jan  3 00:30:27 2011
@@ -54,7 +54,6 @@ import org.apache.solr.common.params.Mod
 import org.apache.solr.common.params.ShardParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.RTimer;
-import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.handler.RequestHandlerBase;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java Mon Jan  3 00:30:27 2011
@@ -23,11 +23,9 @@ import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.lucene.search.spell.LevensteinDistance;
-import org.apache.lucene.search.spell.SpellChecker;
 import org.apache.lucene.search.spell.StringDistance;
 import org.apache.lucene.search.spell.SuggestWord;
 import org.apache.lucene.search.spell.SuggestWordQueue;
-import org.apache.lucene.util.PriorityQueue;
 import org.apache.solr.client.solrj.response.SpellCheckResponse;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.slf4j.Logger;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java Mon Jan  3 00:30:27 2011
@@ -1,7 +1,6 @@
 package org.apache.solr.handler.component;
 
 import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.document.SetBasedFieldSelector;
 import org.apache.lucene.index.IndexReader;
@@ -30,15 +29,12 @@ import org.apache.solr.util.plugin.SolrC
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermsComponent.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermsComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermsComponent.java Mon Jan  3 00:30:27 2011
@@ -18,7 +18,6 @@ package org.apache.solr.handler.componen
 
 import org.apache.lucene.index.*;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.StringHelper;
 import org.apache.noggit.CharArr;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.*;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java Mon Jan  3 00:30:27 2011
@@ -29,7 +29,6 @@ import java.util.Set;
 
 
 import org.apache.lucene.analysis.CachingTokenFilter;
-import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.TokenFilter;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
@@ -50,7 +49,6 @@ import org.apache.solr.core.SolrConfig;
 import org.apache.solr.core.PluginInfo;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.schema.FieldType;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.SchemaField;
 import org.apache.solr.search.DocIterator;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.solr.highlight;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SimpleFacets.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SimpleFacets.java Mon Jan  3 00:30:27 2011
@@ -38,7 +38,6 @@ import org.apache.solr.common.util.Simpl
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.schema.*;
-import org.apache.solr.schema.TrieField.TrieTypes;
 import org.apache.solr.search.*;
 import org.apache.solr.util.BoundedTreeSet;
 import org.apache.solr.util.ByteUtils;

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequest.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequest.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequest.java Mon Jan  3 00:30:27 2011
@@ -19,7 +19,6 @@ package org.apache.solr.request;
 
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.schema.IndexSchema;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.core.SolrCore;
@@ -63,50 +62,6 @@ public interface SolrQueryRequest {
    */
   public void close();
 
-  /**
-   * Returns the input parameter value for the specified name
-   * @return the value, or the first value if the parameter was
-   * specified more then once; may be null.
-   * @deprecated Use {@link #getParams()} instead.
-   */
-  @Deprecated
-  public String getParam(String name);
-
-  /**
-   * Returns the input parameter values for the specified name
-   * @return the values; may be null or empty depending on implementation
-   * @deprecated Use {@link #getParams()} instead.
-   */
-  @Deprecated
-  public String[] getParams(String name);
-
-  /**
-   * Returns the primary query string parameter of the request
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#Q} instead.
-   */
-  @Deprecated
-  public String getQueryString();
-
-  /**
-   * Signifies the syntax and the handler that should be used
-   * to execute this query.
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#QT} instead.
-   */
-  @Deprecated
-  public String getQueryType();
-
-  /** starting position in matches to return to client
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#START} instead.
-   */
-  @Deprecated
-  public int getStart();
-
-  /** number of matching documents to return
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#ROWS} instead.
-   */
-  @Deprecated
-  public int getLimit();
-
   /** The start time of this request in milliseconds */
   public long getStartTime();
 
@@ -124,11 +79,6 @@ public interface SolrQueryRequest {
    * Suitable for logging.
    */
   public String getParamString();
-
-  /******
-  // Get the current elapsed time in milliseconds
-  public long getElapsedTime();
-  ******/
 }
 
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java Mon Jan  3 00:30:27 2011
@@ -20,8 +20,6 @@ package org.apache.solr.request;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.util.RefCounted;
 import org.apache.solr.schema.IndexSchema;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.core.SolrCore;
@@ -43,32 +41,6 @@ import java.util.HashMap;
  * @version $Id$
  */
 public abstract class SolrQueryRequestBase implements SolrQueryRequest {
-  /**
-   * @deprecated Use org.apache.solr.common.params.CommonParams
-   */
-  @Deprecated
-  public static final String QUERY_NAME="q";
-  /**
-   * @deprecated Use org.apache.solr.common.params.CommonParams
-   */
-  @Deprecated
-  public static final String START_NAME="start";
-  /**
-   * @deprecated Use org.apache.solr.common.params.CommonParams
-   */
-  @Deprecated
-  public static final String ROWS_NAME="rows";
-  /**
-   * @deprecated Use org.apache.solr.common.params.CommonParams
-   */
-  @Deprecated
-  public static final String XSL_NAME="xsl";
-  /**
-   * @deprecated Use org.apache.solr.common.params.CommonParams
-   */
-  @Deprecated
-  public static final String QUERYTYPE_NAME="qt";
-
   protected final SolrCore core;
   protected final SolrParams origParams;
   protected SolrParams params;
@@ -98,99 +70,6 @@ public abstract class SolrQueryRequestBa
     this.params = params;
   }
 
-  /**
-   * @deprecated Use {@link #getParams()} instead.
-   */
-  @Deprecated
-  public String getParam(String name) {
-    return params.get(name);
-  }
-
-  /**
-   * @deprecated Use {@link #getParams()} instead.
-   */
-  @Deprecated
-  public String[] getParams(String name) {
-    return params.getParams(name);
-  }
-
-  /**
-   * @deprecated use getParams().required().getInt( name ) instead
-   */
-  @Deprecated
-  public int getIntParam(String name) {
-    String s = getParam(name);
-    if (s==null) {
-      throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,"Missing required parameter '"+name+"' from " + this);
-    }
-    return Integer.parseInt(s);
-  }
-
-  /**
-   * @deprecated use getParams().required().getInt( name ) instead
-   */
-  @Deprecated
-  public int getIntParam(String name, int defval) {
-    String s = getParam(name);
-    return s==null ? defval : Integer.parseInt(s);
-  }
-
-  /**
-   * @deprecated use getParams().required().getParam( name ) instead
-   */
-  @Deprecated
-  public String getStrParam(String name) {
-    String s = getParam(name);
-    if (s==null) {
-      throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,"Missing required parameter '"+name+"' from " + this);
-    }
-    return s;
-  }
-
-  /**
-   * @deprecated use getParams().required().getParam( name ) instead
-   */
-  @Deprecated
-  public String getStrParam(String name, String defval) {
-    String s = getParam(name);
-    return s==null ? defval : s;
-  }
-
-  /**
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#Q} instead.
-   */
-  @Deprecated
-  public String getQueryString() {
-    return params.get(CommonParams.Q);
-  }
-
-  /**
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#QT} instead.
-   */
-  @Deprecated
-  public String getQueryType() {
-    return params.get(CommonParams.QT);
-  }
-
-  /**
-   * starting position in matches to return to client
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#START} instead.
-   */
-  @Deprecated
-  public int getStart() {
-    return params.getInt(CommonParams.START, 0);
-  }
-
-  /**
-   * number of matching documents to return
-   * @deprecated Use {@link #getParams()} and {@link CommonParams#ROWS} instead.
-   */
-  @Deprecated
-  public int getLimit() {
-    return params.getInt(CommonParams.ROWS, 10);
-  }
-
-
   protected final long startTime=System.currentTimeMillis();
   // Get the start time of this request in milliseconds
   public long getStartTime() {

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java Mon Jan  3 00:30:27 2011
@@ -17,7 +17,6 @@ package org.apache.solr.response;
  */
 
 
-import java.io.Writer;
 import java.io.OutputStream;
 import java.io.IOException;
 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/CSVResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/CSVResponseWriter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/CSVResponseWriter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/CSVResponseWriter.java Mon Jan  3 00:30:27 2011
@@ -475,10 +475,6 @@ class CSVWriter extends TextResponseWrit
   }
 
   @Override
-  public void writeArray(String name, Object[] val) throws IOException {
-  }
-
-  @Override
   public void writeArray(String name, Iterator val) throws IOException {
   }
 
@@ -523,14 +519,4 @@ class CSVWriter extends TextResponseWrit
   public void writeDate(String name, String val) throws IOException {
     printer.print(val, false);
   }
-
-  @Override
-  public void writeShort(String name, String val) throws IOException {
-    printer.print(val, false);
-  }
-
-  @Override
-  public void writeByte(String name, String val) throws IOException {
-    printer.print(val, false);
-  }
 }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/JSONResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/JSONResponseWriter.java?rev=1054507&r1=1054506&r2=1054507&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/JSONResponseWriter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/response/JSONResponseWriter.java Mon Jan  3 00:30:27 2011
@@ -63,10 +63,6 @@ public class JSONResponseWriter implemen
 
 
 class JSONWriter extends TextResponseWriter {
-
-  // cache the calendar instance in case we are writing many dates...
-  private Calendar cal;
-
   private String namedListStyle;
   private String wrapperFunction;
 
@@ -682,10 +678,6 @@ class JSONWriter extends TextResponseWri
     }
   }
 
-  public void writeArray(String name, Object[] val) throws IOException {
-    writeArray(name, Arrays.asList(val).iterator());
-  }
-
   public void writeArray(String name, Iterator val) throws IOException {
     writeArrayOpener(-1); // no trivial way to determine array size
     incLevel();
@@ -729,73 +721,6 @@ class JSONWriter extends TextResponseWri
     writer.write(val);
   }
 
-   @Override
-  public void writeShort(String name, String val) throws IOException {
-    writer.write(val);
-  }
-
-  public void writeByte(String name, String val) throws IOException {
-    writer.write(val);
-
-  }
-
-  // TODO: refactor this out to a DateUtils class or something...
-  public void writeDate(String name, Date val) throws IOException {
-    // using a stringBuilder for numbers can be nice since
-    // a temporary string isn't used (it's added directly to the
-    // builder's buffer.
-
-    StringBuilder sb = new StringBuilder();
-    if (cal==null) cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.US);
-    cal.setTime(val);
-
-    int i = cal.get(Calendar.YEAR);
-    sb.append(i);
-    sb.append('-');
-    i = cal.get(Calendar.MONTH) + 1;  // 0 based, so add 1
-    if (i<10) sb.append('0');
-    sb.append(i);
-    sb.append('-');
-    i=cal.get(Calendar.DAY_OF_MONTH);
-    if (i<10) sb.append('0');
-    sb.append(i);
-    sb.append('T');
-    i=cal.get(Calendar.HOUR_OF_DAY); // 24 hour time format
-    if (i<10) sb.append('0');
-    sb.append(i);
-    sb.append(':');
-    i=cal.get(Calendar.MINUTE);
-    if (i<10) sb.append('0');
-    sb.append(i);
-    sb.append(':');
-    i=cal.get(Calendar.SECOND);
-    if (i<10) sb.append('0');
-    sb.append(i);
-    i=cal.get(Calendar.MILLISECOND);
-    if (i != 0) {
-      sb.append('.');
-      if (i<100) sb.append('0');
-      if (i<10) sb.append('0');
-      sb.append(i);
-
-      // handle canonical format specifying fractional
-      // seconds shall not end in '0'.  Given the slowness of
-      // integer div/mod, simply checking the last character
-      // is probably the fastest way to check.
-      int lastIdx = sb.length()-1;
-      if (sb.charAt(lastIdx)=='0') {
-        lastIdx--;
-        if (sb.charAt(lastIdx)=='0') {
-          lastIdx--;
-        }
-        sb.setLength(lastIdx+1);
-      }
-
-    }
-    sb.append('Z');
-    writeDate(name, sb.toString());
-  }
-
   public void writeDate(String name, String val) throws IOException {
     writeStr(name, val, false);
   }



Mime
View raw message