lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject svn commit: r1479862 [33/38] - in /lucene/dev/branches/lucene4258: ./ dev-tools/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/maven/ dev-tools/maven/solr/ dev-tools/maven/solr/core/src/java/ dev-tools/maven/solr/solrj/src/java/ dev-t...
Date Tue, 07 May 2013 11:21:14 GMT
Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessor.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessor.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessor.java Tue May  7 11:20:55 2013
@@ -18,27 +18,21 @@
 package org.apache.solr.update.processor;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
 
-import static org.apache.solr.common.SolrException.ErrorCode.*;
+import static org.apache.solr.common.SolrException.ErrorCode.BAD_REQUEST;
+import static org.apache.solr.common.SolrException.ErrorCode.SERVER_ERROR;
 
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.SolrInputField;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrResourceLoader;
-import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.FieldType;
 
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.update.AddUpdateCommand;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -197,7 +191,7 @@ public abstract class FieldMutatingUpdat
    */
   public static FieldNameSelector createFieldNameSelector
     (final SolrResourceLoader loader,
-     final IndexSchema schema,
+     final SolrCore core,
      final Set<String> fields,
      final Set<String> typeNames,
      final Collection<String> typeClasses,
@@ -223,25 +217,24 @@ public abstract class FieldMutatingUpdat
       return defSelector;
     }
     
-    return new ConfigurableFieldNameSelector
-      (schema, fields, typeNames, classes, regexes); 
+    return new ConfigurableFieldNameSelector(core, fields, typeNames, classes, regexes); 
   }
   
   private static final class ConfigurableFieldNameSelector 
     implements FieldNameSelector {
 
-    final IndexSchema schema;
+    final SolrCore core;
     final Set<String> fields;
     final Set<String> typeNames;
     final Collection<Class> classes;
     final Collection<Pattern> regexes;
 
-    private ConfigurableFieldNameSelector(final IndexSchema schema,
+    private ConfigurableFieldNameSelector(final SolrCore core,
                                           final Set<String> fields,
                                           final Set<String> typeNames,
                                           final Collection<Class> classes,
                                           final Collection<Pattern> regexes) {
-      this.schema = schema;
+      this.core = core;
       this.fields = fields;
       this.typeNames = typeNames;
       this.classes = classes;
@@ -260,7 +253,7 @@ public abstract class FieldMutatingUpdat
       
       // do not consider it an error if the fieldName has no type
       // there might be another processor dealing with it later
-      FieldType t = schema.getFieldTypeNoEx(fieldName);
+      FieldType t =  core.getLatestSchema().getFieldTypeNoEx(fieldName);
       if (null != t) {
         if (! (typeNames.isEmpty() || typeNames.contains(t.getTypeName())) ) {
           return false;

Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java Tue May  7 11:20:55 2013
@@ -17,7 +17,6 @@
 
 package org.apache.solr.update.processor;
 
-import java.io.IOException;
 import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -32,11 +31,6 @@ import org.apache.solr.core.SolrCore;
 import org.apache.solr.common.SolrException;
 import static org.apache.solr.common.SolrException.ErrorCode.*;
 import org.apache.solr.common.util.NamedList;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.update.AddUpdateCommand;
-import org.apache.solr.schema.IndexSchema;
-import org.apache.solr.schema.FieldType;
 import org.apache.solr.util.plugin.SolrCoreAware;
 
 
@@ -199,12 +193,10 @@ public abstract class FieldMutatingUpdat
   @Override
   public void inform(final SolrCore core) {
     
-    final IndexSchema schema = core.getSchema();
-
     selector = 
       FieldMutatingUpdateProcessor.createFieldNameSelector
       (core.getResourceLoader(),
-       core.getSchema(),
+       core,
        inclusions.fieldName,
        inclusions.typeName,
        inclusions.typeClass,
@@ -216,7 +208,7 @@ public abstract class FieldMutatingUpdat
         (selector,
          FieldMutatingUpdateProcessor.createFieldNameSelector
          (core.getResourceLoader(),
-          core.getSchema(),
+          core,
           exc.fieldName,
           exc.typeName,
           exc.typeClass,

Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.java Tue May  7 11:20:55 2013
@@ -22,7 +22,6 @@ import org.apache.solr.schema.IndexSchem
 import org.apache.solr.schema.FieldType;
 
 import org.apache.solr.common.SolrInputField;
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 
@@ -71,11 +70,10 @@ public final class IgnoreFieldUpdateProc
   public FieldMutatingUpdateProcessor.FieldNameSelector 
     getDefaultSelector(final SolrCore core) {
 
-    final IndexSchema schema = core.getSchema();
     return new FieldMutatingUpdateProcessor.FieldNameSelector() {
       @Override
       public boolean shouldMutate(final String fieldName) {
-
+        final IndexSchema schema = core.getLatestSchema();
         FieldType type = schema.getFieldTypeNoEx(fieldName);
         return (null == type);
 

Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java Tue May  7 11:20:55 2013
@@ -75,7 +75,7 @@ public class SignatureUpdateProcessorFac
 
   @Override
   public void inform(SolrCore core) {
-    final SchemaField field = core.getSchema().getFieldOrNull(getSignatureField());
+    final SchemaField field = core.getLatestSchema().getFieldOrNull(getSignatureField());
     if (null == field) {
       throw new SolrException
         (ErrorCode.SERVER_ERROR,

Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/DOMUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/DOMUtil.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/DOMUtil.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/DOMUtil.java Tue May  7 11:20:55 2013
@@ -301,6 +301,103 @@ public class DOMUtil {
       }
     }
   }
+  
+  public static String substituteProperty(String value, Properties coreProperties) {
+    if (value == null || value.indexOf('$') == -1) {
+      return value;
+    }
+
+    List<String> fragments = new ArrayList<String>();
+    List<String> propertyRefs = new ArrayList<String>();
+    parsePropertyString(value, fragments, propertyRefs);
+
+    StringBuilder sb = new StringBuilder();
+    Iterator<String> i = fragments.iterator();
+    Iterator<String> j = propertyRefs.iterator();
+
+    while (i.hasNext()) {
+      String fragment = i.next();
+      if (fragment == null) {
+        String propertyName = j.next();
+        String defaultValue = null;
+        int colon_index = propertyName.indexOf(':');
+        if (colon_index > -1) {
+          defaultValue = propertyName.substring(colon_index + 1);
+          propertyName = propertyName.substring(0,colon_index);
+        }
+        if (coreProperties != null) {
+          fragment = coreProperties.getProperty(propertyName);
+        }
+        if (fragment == null) {
+          fragment = System.getProperty(propertyName, defaultValue);
+        }
+        if (fragment == null) {
+          throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "No system property or default value specified for " + propertyName + " value:" + value);
+        }
+      }
+      sb.append(fragment);
+    }
+    return sb.toString();
+  }
+  
+  /*
+   * This method borrowed from Ant's PropertyHelper.parsePropertyStringDefault:
+   *   http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
+   */
+  private static void parsePropertyString(String value, List<String> fragments, List<String> propertyRefs) {
+      int prev = 0;
+      int pos;
+      //search for the next instance of $ from the 'prev' position
+      while ((pos = value.indexOf("$", prev)) >= 0) {
+
+          //if there was any text before this, add it as a fragment
+          //TODO, this check could be modified to go if pos>prev;
+          //seems like this current version could stick empty strings
+          //into the list
+          if (pos > 0) {
+              fragments.add(value.substring(prev, pos));
+          }
+          //if we are at the end of the string, we tack on a $
+          //then move past it
+          if (pos == (value.length() - 1)) {
+              fragments.add("$");
+              prev = pos + 1;
+          } else if (value.charAt(pos + 1) != '{') {
+              //peek ahead to see if the next char is a property or not
+              //not a property: insert the char as a literal
+              /*
+              fragments.addElement(value.substring(pos + 1, pos + 2));
+              prev = pos + 2;
+              */
+              if (value.charAt(pos + 1) == '$') {
+                  //backwards compatibility two $ map to one mode
+                  fragments.add("$");
+                  prev = pos + 2;
+              } else {
+                  //new behaviour: $X maps to $X for all values of X!='$'
+                  fragments.add(value.substring(pos, pos + 2));
+                  prev = pos + 2;
+              }
+
+          } else {
+              //property found, extract its name or bail on a typo
+              int endName = value.indexOf('}', pos);
+              if (endName < 0) {
+                throw new RuntimeException("Syntax error in property: " + value);
+              }
+              String propertyName = value.substring(pos + 2, endName);
+              fragments.add(null);
+              propertyRefs.add(propertyName);
+              prev = endName + 1;
+          }
+      }
+      //no more $ signs found
+      //if there is any tail to the string, append it
+      if (prev < value.length()) {
+          fragments.add(value.substring(prev));
+      }
+  }
+
 
 
 }

Modified: lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java Tue May  7 11:20:55 2013
@@ -19,8 +19,13 @@ package org.apache.solr.util;
 
 import org.apache.lucene.index.StorableField;
 import org.apache.lucene.index.StoredDocument;
-import org.apache.lucene.search.*;
+import org.apache.lucene.search.BooleanClause;
 import org.apache.lucene.search.BooleanClause.Occur;
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.lucene.search.DisjunctionMaxQuery;
+import org.apache.lucene.search.Explanation;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.Sort;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrException;
@@ -38,10 +43,27 @@ import org.apache.solr.request.SolrQuery
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.SchemaField;
-import org.apache.solr.search.*;
+import org.apache.solr.search.CacheRegenerator;
+import org.apache.solr.search.DocIterator;
+import org.apache.solr.search.DocList;
+import org.apache.solr.search.DocSet;
+import org.apache.solr.search.FieldParams;
+import org.apache.solr.search.QParser;
+import org.apache.solr.search.QueryParsing;
+import org.apache.solr.search.ReturnFields;
+import org.apache.solr.search.SolrCache;
+import org.apache.solr.search.SolrIndexSearcher;
+import org.apache.solr.search.SolrQueryParser;
+import org.apache.solr.search.SyntaxError;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+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 java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
@@ -152,7 +174,7 @@ public class SolrPluginUtils {
           fieldFilter.add(field);
 
         // fetch unique key if one exists.
-        SchemaField keyField = req.getSearcher().getSchema().getUniqueKeyField();
+        SchemaField keyField = searcher.getSchema().getUniqueKeyField();
         if(null != keyField)
           fieldFilter.add(keyField.getName());
       }
@@ -270,7 +292,7 @@ public class SolrPluginUtils {
   {
     if (dbgResults) {
       SolrIndexSearcher searcher = req.getSearcher();
-      IndexSchema schema = req.getSchema();
+      IndexSchema schema = searcher.getSchema();
       boolean explainStruct = req.getParams().getBool(CommonParams.EXPLAIN_STRUCT, false);
 
       NamedList<Explanation> explain = getExplanations(query, results, searcher, schema);

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-copyfield-test.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-copyfield-test.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-copyfield-test.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-copyfield-test.xml Tue May  7 11:20:55 2013
@@ -277,7 +277,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
     
@@ -346,8 +346,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>
@@ -466,7 +466,12 @@
    <copyField source="sku*" dest="*_s"/>
    <copyField source="sku*" dest="*_dest_sub_s"/>
    <copyField source="sku*" dest="dest_sub_no_ast_s"/>
-     
+
+   <!-- test source glob that doesn't match any explicit or dynamic field -->
+   <copyField source="testing123_*" dest="text"/>
+  
+   <copyField source="*" dest="catchall_t"/>
+
  <!-- Similarity is the scoring routine for each document vs a query.
       A custom similarity may be specified here, but the default is fine
       for most applications.

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-postingshighlight.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-postingshighlight.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-postingshighlight.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-postingshighlight.xml Tue May  7 11:20:55 2013
@@ -26,6 +26,7 @@
     <fieldtype name="text" class="solr.TextField">
       <analyzer>
         <tokenizer class="solr.MockTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
       </analyzer>
     </fieldtype>
     
@@ -33,6 +34,7 @@
     <fieldtype name="text_offsets" class="solr.TextField" storeOffsetsWithPositions="true">
       <analyzer>
         <tokenizer class="solr.MockTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
       </analyzer>
     </fieldtype>
    </types>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-required-fields.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-required-fields.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-required-fields.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-required-fields.xml Tue May  7 11:20:55 2013
@@ -268,7 +268,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
     
@@ -337,8 +337,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-rest.xml Tue May  7 11:20:55 2013
@@ -111,7 +111,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -124,7 +123,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -141,7 +139,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -154,7 +151,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -355,7 +351,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
 
@@ -469,8 +465,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>
@@ -623,4 +619,6 @@
    <copyField source="title_*" dest="*_dest_sub_s"/>
    <copyField source="title_*" dest="dest_sub_no_ast_s"/>
 
+  <solrQueryParser defaultOperator="OR"/>
+
 </schema>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml Tue May  7 11:20:55 2013
@@ -258,9 +258,6 @@
      type: mandatory - the name of a previously defined type from the <types> section
      indexed: true if this field should be indexed (searchable or sortable)
      stored: true if this field should be retrievable
-     compressed: [false] if this field should be stored using gzip compression
-       (this will only apply if the field type is compressable; among
-       the standard field types, only TextField and StrField are)
      multiValued: true if this field may contain multiple values per document
      omitNorms: (expert) set to true to omit the norms associated with
        this field (this disables length normalization and index-time

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema.xml Tue May  7 11:20:55 2013
@@ -204,7 +204,7 @@
     <fieldtype name="lowerpunctfilt" class="solr.TextField">
       <analyzer>
         <tokenizer class="solr.MockTokenizerFactory"/>
-        <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt" expand="true"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" expand="true"/>
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
       </analyzer>
@@ -355,7 +355,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="old_synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="old_synonyms.txt"/>
       </analyzer>
     </fieldtype>
 
@@ -506,22 +506,22 @@
    <!-- indexed=false should not prevent omit___=true -->
    <field name="pint_i_norm" type="pint" omitNorms="true"
           indexed="false" />
-   <field name="pint_i_tf"   type="pint" omitOmitTermFreqAndPositions="true"
+   <field name="pint_i_tf"   type="pint" omitTermFreqAndPositions="true"
           indexed="false" />
    <field name="pint_i_pos"  type="pint" omitPositions="true"
           indexed="false" />
    <field name="pint_i_all"  type="pint" 
           indexed="false" 
           omitNorms="true"
-          omitOmitTermFreqAndPositions="true"
+          omitTermFreqAndPositions="true"
           omitPositions="true" />
-   <!-- omitOmitTermFreqAndPositions=false and omitPositions=true are ok -->
+   <!-- omitTermFreqAndPositions=false and omitPositions=true are ok -->
    <field name="pint_tf_pos" type="pint" indexed="true" 
-          omitOmitTermFreqAndPositions="false" omitPositions="true" />
+          omitTermFreqAndPositions="false" omitPositions="true" />
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>
@@ -582,6 +582,8 @@
    
    <field name="store" type="location" indexed="true" stored="true" omitNorms="false"/>
 
+   <field name="lower" type="lowertok" indexed="false" stored="true" multiValued="true" />
+
    <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
         will be used if the name matches any of the patterns.
         RESTRICTION: the glob-like pattern in the name attribute must have

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema11.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema11.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema11.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema11.xml Tue May  7 11:20:55 2013
@@ -296,9 +296,6 @@ valued. -->
      type: mandatory - the name of a previously defined type from the <types> section
      indexed: true if this field should be indexed (searchable or sortable)
      stored: true if this field should be retrievable
-     compressed: [false] if this field should be stored using gzip compression
-       (this will only apply if the field type is compressable; among
-       the standard field types, only TextField and StrField are)
      multiValued: true if this field may contain multiple values per document
      omitNorms: (expert) set to true to omit the norms associated with
        this field (this disables length normalization and index-time

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema12.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema12.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema12.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema12.xml Tue May  7 11:20:55 2013
@@ -119,7 +119,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -132,7 +131,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -149,7 +147,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -162,7 +159,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -357,7 +353,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
 
@@ -472,8 +468,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>
@@ -596,6 +592,11 @@
    <dynamicField name="bar_copydest_*" type="ignored" multiValued="true"/>
    <dynamicField name="*_es"  type="text"    indexed="true"  stored="true"/>
 
+   <!-- for testing if score psuedofield is erroneously treated as multivalued
+        when a matching dynamic field exists 
+   -->
+   <dynamicField name="*core" type="ignored" multiValued="true" />
+
  </fields>
 
  <defaultSearchField>text</defaultSearchField>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema15.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema15.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema15.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schema15.xml Tue May  7 11:20:55 2013
@@ -112,7 +112,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -125,7 +124,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -142,7 +140,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -155,7 +152,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -356,7 +352,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
 
@@ -470,8 +466,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schemasurround.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schemasurround.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schemasurround.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/schemasurround.xml Tue May  7 11:20:55 2013
@@ -119,7 +119,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -132,7 +131,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -149,7 +147,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -162,7 +159,6 @@
         <filter class="solr.StopFilterFactory"
                 ignoreCase="true"
                 words="stopwords.txt"
-                enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -357,7 +353,7 @@
     <fieldtype name="syn" class="solr.TextField">
       <analyzer>
           <tokenizer class="solr.MockTokenizerFactory"/>
-          <filter name="syn" class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
+          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"/>
       </analyzer>
     </fieldtype>
 
@@ -487,8 +483,8 @@
      termPositions="true" termOffsets="true"/>
 
    <!-- test highlit field settings -->
-   <field name="test_hlt" type="highlittext" indexed="true" compressed="true"/>
-   <field name="test_hlt_off" type="highlittext" indexed="true" compressed="false"/>
+   <field name="test_hlt" type="highlittext" indexed="true"/>
+   <field name="test_hlt_off" type="highlittext" indexed="true"/>
 
    <!-- fields to test individual tokenizers and tokenfilters -->
    <field name="teststop" type="teststop" indexed="true" stored="true"/>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml Tue May  7 11:20:55 2013
@@ -22,9 +22,12 @@
   <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
   <dataDir>${solr.data.dir:}</dataDir>
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
-  <requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
-
+  <requestHandler name="standard" class="solr.StandardRequestHandler">
+    <lst name="defaults">
+      <bool name="hl.defaultSummary">false</bool>
+    </lst>
+  </requestHandler>
   <searchComponent class="solr.HighlightComponent" name="highlight">
-    <highlighting class="org.apache.solr.highlight.PostingsSolrHighlighter" summarizeEmpty="false"/>
+    <highlighting class="org.apache.solr.highlight.PostingsSolrHighlighter"/>
   </searchComponent>
 </config>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml Tue May  7 11:20:55 2013
@@ -390,4 +390,30 @@
     </processor>
   </updateRequestProcessorChain>
 
+  <updateRequestProcessorChain name="pre-analyzed-simple">
+    <processor class="solr.PreAnalyzedUpdateProcessorFactory">
+      <str name="fieldName">subject</str>
+      <str name="fieldName">title</str>
+      <str name="fieldName">teststop</str>
+      <str name="fieldName">nonexistent</str>
+      <str name="fieldName">ssto</str>
+      <str name="fieldName">sind</str>
+      <str name="parser">simple</str>
+    </processor>
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="pre-analyzed-json">
+    <processor class="solr.PreAnalyzedUpdateProcessorFactory">
+      <str name="fieldName">subject</str>
+      <str name="fieldName">title</str>
+      <str name="fieldName">teststop</str>
+      <str name="fieldName">nonexistent</str>
+      <str name="fieldName">ssto</str>
+      <str name="fieldName">sind</str>
+      <str name="parser">json</str>
+    </processor>
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+
 </config>

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/collection1/conf/trivial.updateprocessor0.js Tue May  7 11:20:55 2013
@@ -1,12 +1,14 @@
+var Assert = Packages.org.junit.Assert;
+
 function processAdd(cmd) {
     functionMessages.add("processAdd0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
-    testCase.assertNotNull(cmd);
-    testCase.assertNotNull(params);
-    testCase.assertTrue(1 == params.get('intValue').intValue());  // had issues with assertTrue(1, params.get('intValue').intValue()) casting to wrong variant
-    testCase.assertTrue(params.get('boolValue').booleanValue());
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
+    Assert.assertNotNull(cmd);
+    Assert.assertNotNull(params);
+    Assert.assertTrue(1 == params.get('intValue').intValue());  // had issues with assertTrue(1, params.get('intValue').intValue()) casting to wrong variant
+    Assert.assertTrue(params.get('boolValue').booleanValue());
 
     // Integer.valueOf is needed here to get a tru java object, because 
     // all javascript numbers are floating point (ie: java.lang.Double)
@@ -18,40 +20,40 @@ function processAdd(cmd) {
 
 function processDelete(cmd) {
     functionMessages.add("processDelete0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
-    testCase.assertNotNull(cmd);
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
+    Assert.assertNotNull(cmd);
 }
 
 function processMergeIndexes(cmd) {
     functionMessages.add("processMergeIndexes0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
-    testCase.assertNotNull(cmd);
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
+    Assert.assertNotNull(cmd);
 }
 
 function processCommit(cmd) {
     functionMessages.add("processCommit0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
-    testCase.assertNotNull(cmd);
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
+    Assert.assertNotNull(cmd);
 }
 
 function processRollback(cmd) {
     functionMessages.add("processRollback0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
-    testCase.assertNotNull(cmd);
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
+    Assert.assertNotNull(cmd);
 }
 
 function finish() {
     functionMessages.add("finish0");
-    testCase.assertNotNull(req);
-    testCase.assertNotNull(rsp);
-    testCase.assertNotNull(logger);
+    Assert.assertNotNull(req);
+    Assert.assertNotNull(rsp);
+    Assert.assertNotNull(logger);
 }
 

Modified: lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/solr-no-core.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/solr-no-core.xml?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/solr-no-core.xml (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test-files/solr/solr-no-core.xml Tue May  7 11:20:55 2013
@@ -16,26 +16,23 @@
  limitations under the License.
 -->
 
-<!--
- All (relative) paths are relative to the installation path
-  
-  persistent: Save changes made via the API to this file
-  sharedLib: path to a lib directory that will be shared across all cores
--->
-<solr persistent="${solr.xml.persist:false}">
+<solr>
+
+  <str name="shareSchema">${shareSchema:false}</str>
+
+  <solrcloud>
+    <str name="host">127.0.0.1</str>
+    <str name="hostContext">${hostContext:solr}</str>
+    <int name="hostPort">${hostPort:8983}</int>
+    <int name="zkClientTimeout">${solr.zkclienttimeout:30000}</int>
+    <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:15000}</int>
+    <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:120000}</int>
+  </solrcloud>
 
-  <!--
-  adminPath: RequestHandler path to manage cores.  
-    If 'null' (or absent), cores will not be manageable via request handler
-  -->
-  <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}" 
-         hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" numShards="${numShards:3}" shareSchema="${shareSchema:false}" 
-         distribUpdateConnTimeout="${distribUpdateConnTimeout:15000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:120000}">
+  <shardHandlerFactory name="shardHandlerFactory"
+    class="HttpShardHandlerFactory">
+    <int name="socketTimeout">${socketTimeout:120000}</int>
+    <int name="connTimeout">${connTimeout:15000}</int>
+  </shardHandlerFactory>
 
-    <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
-      <int name="socketTimeout">${socketTimeout:120000}</int>
-      <int name="connTimeout">${connTimeout:15000}</int>
-    </shardHandlerFactory>
-  </cores>
-  
-</solr>
+</solr>
\ No newline at end of file

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java Tue May  7 11:20:55 2013
@@ -53,6 +53,7 @@ import org.apache.solr.response.ResultCo
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.response.XMLWriter;
 import org.apache.solr.schema.IndexSchema;
+import org.apache.solr.schema.IndexSchemaFactory;
 import org.apache.solr.schema.SchemaField;
 import org.apache.solr.search.DocIterator;
 import org.apache.solr.search.DocList;
@@ -530,7 +531,7 @@ public class BasicFunctionalityTest exte
   @Test
   public void testTermVectorFields() {
     
-    IndexSchema ischema = new IndexSchema(solrConfig, getSchemaFile(), null);
+    IndexSchema ischema = IndexSchemaFactory.buildIndexSchema(getSchemaFile(), solrConfig);
     SchemaField f; // Solr field type
     StorableField luf; // Lucene field
 

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java Tue May  7 11:20:55 2013
@@ -87,8 +87,8 @@ public class DisMaxRequestHandlerTest ex
             req("cool stuff")
             ,"//*[@numFound='3']"
             ,"//result/doc[1]/int[@name='id'][.='42']"
-            ,"//result/doc[2]/int[@name='id'][.='666']"
-            ,"//result/doc[3]/int[@name='id'][.='8675309']"
+            ,"//result/doc[2]/int[@name='id'][.='8675309']"
+            ,"//result/doc[3]/int[@name='id'][.='666']"
             );
 
     assertQ("multi qf",

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java Tue May  7 11:20:55 2013
@@ -43,7 +43,7 @@ public class MinimalSchemaTest extends S
        a uniqueKey field and defeat the point of the tests
     */
     assertNull("UniqueKey Field isn't null", 
-               h.getCore().getSchema().getUniqueKeyField());
+               h.getCore().getLatestSchema().getUniqueKeyField());
 
     lrf.args.put(CommonParams.VERSION,"2.2");
 

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java Tue May  7 11:20:55 2013
@@ -137,7 +137,11 @@ public class TestDistributedGrouping ext
     for (int shard = 0; shard < clients.size(); shard++) {
       int groupValue = values[shard];
       for (int i = 500; i < 600; i++) {
-        index_specific(shard, i1, groupValue, s1, "a", id, i * (shard + 1), t1, shard);
+        index_specific(shard, 
+                       i1, groupValue, 
+                       s1, "a", 
+                       id, i * (shard + 1), 
+                       t1, random().nextInt(7));
       }
     }
 
@@ -197,6 +201,17 @@ public class TestDistributedGrouping ext
     query("q", "*:*", "fq", s1 + ":a", "rows", 100, "fl", "id," + i1, "group", "true", "group.field", i1, "group.limit", 10, "sort", i1 + " asc, id asc", "group.ngroups", "true");
     query("q", "*:*", "fq", s1 + ":a", "rows", 100, "fl", "id," + i1, "group", "true", "group.field", i1, "group.limit", 10, "sort", i1 + " asc, id asc", "group.truncate", "true");
     query("q", "*:*", "fq", s1 + ":a", "rows", 100, "fl", "id," + i1, "group", "true", "group.field", i1, "group.limit", 10, "sort", i1 + " asc, id asc", "group.truncate", "true", "facet", "true", "facet.field", t1);
+    for (String gfacet : new String[] { "true", "false" }) {
+      for (String flimit : new String[] { "-100","-1", "1", "2", "10000" }) {
+        for (String foffset : new String[] { "0","1", "2", "1000" }) {
+          query("q", "*:*", "fq", s1+":a", 
+                "rows", 100, "fl", "id,"+i1, "sort", i1+" asc, id asc", 
+                "group", "true", "group.field", i1, "group.limit", 10, 
+                "facet", "true", "facet.field", t1, "group.facet", gfacet, 
+                "facet.limit", flimit, "facet.offset", foffset);
+        }
+      }
+    }
 
     // SOLR-3316
     query("q", "*:*", "fq", s1 + ":a", "rows", 0, "fl", "id," + i1, "group", "true", "group.field", i1, "group.limit", 10, "sort", i1 + " asc, id asc", "facet", "true", "facet.field", t1);

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestGroupingSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestGroupingSearch.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestGroupingSearch.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestGroupingSearch.java Tue May  7 11:20:55 2013
@@ -35,7 +35,16 @@ import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 
 public class TestGroupingSearch extends SolrTestCaseJ4 {
 
@@ -720,10 +729,12 @@ public class TestGroupingSearch extends 
         int group_limit = random().nextInt(10)==0 ? random().nextInt(model.size()+2) : random().nextInt(11)-1;    
         int group_offset = random().nextInt(10)==0 ? random().nextInt(model.size()+2) : random().nextInt(2); // pick a small start normally for better coverage
 
+        IndexSchema schema = h.getCore().getLatestSchema();
+        
         String[] stringSortA = new String[1];
-        Comparator<Doc> sortComparator = createSort(h.getCore().getSchema(), types, stringSortA);
+        Comparator<Doc> sortComparator = createSort(schema, types, stringSortA);
         String sortStr = stringSortA[0];
-        Comparator<Doc> groupComparator = random().nextBoolean() ? sortComparator : createSort(h.getCore().getSchema(), types, stringSortA);
+        Comparator<Doc> groupComparator = random().nextBoolean() ? sortComparator : createSort(schema, types, stringSortA);
         String groupSortStr = stringSortA[0];
 
         // since groupSortStr defaults to sortStr, we need to normalize null to "score desc" if
@@ -760,7 +771,7 @@ public class TestGroupingSearch extends 
         Collections.sort(sortedGroups,  groupComparator==sortComparator ? createFirstDocComparator(sortComparator) : createMaxDocComparator(sortComparator));
 
         boolean includeNGroups = random().nextBoolean();
-        Object modelResponse = buildGroupedResult(h.getCore().getSchema(), sortedGroups, start, rows, group_offset, group_limit, includeNGroups);
+        Object modelResponse = buildGroupedResult(schema, sortedGroups, start, rows, group_offset, group_limit, includeNGroups);
 
         boolean truncateGroups = random().nextBoolean();
         Map<String, Integer> facetCounts = new TreeMap<String, Integer>();

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestJoin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestJoin.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestJoin.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestJoin.java Tue May  7 11:20:55 2013
@@ -17,25 +17,21 @@
 
 package org.apache.solr;
 
-import org.apache.lucene.search.FieldCache;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.BooleanQuery;
-
 import org.noggit.JSONUtil;
 import org.noggit.ObjectBuilder;
-import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.handler.JsonUpdateRequestHandler;
 import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.request.SolrRequestHandler;
-import org.apache.solr.schema.IndexSchema;
-import org.apache.solr.servlet.DirectSolrConnection;
-import org.apache.solr.search.QParser;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public class TestJoin extends SolrTestCaseJ4 {
 
@@ -198,7 +194,7 @@ public class TestJoin extends SolrTestCa
         List sortedDocs = new ArrayList();
         for (Doc doc : docList) {
           if (sortedDocs.size() >= 10) break;
-          sortedDocs.add(doc.toObject(h.getCore().getSchema()));
+          sortedDocs.add(doc.toObject(h.getCore().getLatestSchema()));
         }
 
         Map<String,Object> resultSet = new LinkedHashMap<String,Object>();

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestRandomFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestRandomFaceting.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestRandomFaceting.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestRandomFaceting.java Tue May  7 11:20:55 2013
@@ -55,15 +55,17 @@ public class TestRandomFaceting extends 
     types = new ArrayList<FldType>();
     types.add(new FldType("id",ONE_ONE, new SVal('A','Z',4,4)));
     types.add(new FldType("score_f",ONE_ONE, new FVal(1,100)));
-    types.add(new FldType("foo_i",ZERO_ONE, new IRange(0,indexSize)));
+    types.add(new FldType("small_f",ONE_ONE, new FVal(-4,5)));
+    types.add(new FldType("small_d",ONE_ONE, new FVal(-4,5)));
+    types.add(new FldType("foo_i",ZERO_ONE, new IRange(-2,indexSize)));
     types.add(new FldType("small_s",ZERO_ONE, new SVal('a',(char)('c'+indexSize/3),1,1)));
     types.add(new FldType("small2_s",ZERO_ONE, new SVal('a',(char)('c'+indexSize/3),1,1)));
     types.add(new FldType("small2_ss",ZERO_TWO, new SVal('a',(char)('c'+indexSize/3),1,1)));
     types.add(new FldType("small3_ss",new IRange(0,25), new SVal('A','z',1,1)));
-    types.add(new FldType("small_i",ZERO_ONE, new IRange(0,5+indexSize/3)));
-    types.add(new FldType("small2_i",ZERO_ONE, new IRange(0,5+indexSize/3)));
-    types.add(new FldType("small2_is",ZERO_TWO, new IRange(0,5+indexSize/3)));
-    types.add(new FldType("small3_is",new IRange(0,25), new IRange(0,100)));
+    types.add(new FldType("small_i",ZERO_ONE, new IRange(-2,5+indexSize/3)));
+    types.add(new FldType("small2_i",ZERO_ONE, new IRange(-1,5+indexSize/3)));
+    types.add(new FldType("small2_is",ZERO_TWO, new IRange(-2,5+indexSize/3)));
+    types.add(new FldType("small3_is",new IRange(0,25), new IRange(-50,50)));
 
     types.add(new FldType("missing_i",new IRange(0,0), new IRange(0,100)));
     types.add(new FldType("missing_is",new IRange(0,0), new IRange(0,100)));

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestTrie.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestTrie.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestTrie.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/TestTrie.java Tue May  7 11:20:55 2013
@@ -53,7 +53,7 @@ public class TestTrie extends SolrTestCa
   
   @Test
   public void testTokenizer() throws Exception {
-    FieldType type = h.getCore().getSchema().getFieldType("tint");
+    FieldType type = h.getCore().getLatestSchema().getFieldType("tint");
     assertTrue(type instanceof TrieField);
     
     String value = String.valueOf(random().nextInt());
@@ -303,7 +303,7 @@ public class TestTrie extends SolrTestCa
   }
 
   private void checkPrecisionSteps(String fieldType) {
-    FieldType type = h.getCore().getSchema().getFieldType(fieldType);
+    FieldType type = h.getCore().getLatestSchema().getFieldType(fieldType);
     if (type instanceof TrieField) {
       TrieField field = (TrieField) type;
       assertTrue(field.getPrecisionStep() > 0 && field.getPrecisionStep() < 64);

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java Tue May  7 11:20:55 2013
@@ -18,7 +18,6 @@ package org.apache.solr.analysis;
 
 import java.lang.reflect.Field;
 
-import org.apache.lucene.analysis.util.TokenizerFactory;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.core.Config;
 import org.apache.solr.schema.IndexSchema;
@@ -45,7 +44,7 @@ public class TestLuceneMatchVersion exte
   public void testStandardTokenizerVersions() throws Exception {
     assertEquals(DEFAULT_VERSION, solrConfig.luceneMatchVersion);
     
-    final IndexSchema schema = h.getCore().getSchema();
+    final IndexSchema schema = h.getCore().getLatestSchema();
     
     FieldType type = schema.getFieldType("textDefault");
     TokenizerChain ana = (TokenizerChain) type.getAnalyzer();

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java Tue May  7 11:20:55 2013
@@ -34,6 +34,7 @@ import org.apache.lucene.util.automaton.
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.schema.IndexSchema;
+import org.apache.solr.schema.IndexSchemaFactory;
 import org.apache.solr.search.QParser;
 import org.apache.solr.search.SolrQueryParser;
 import org.junit.Before;
@@ -44,7 +45,6 @@ import static org.apache.lucene.analysis
 
 public class TestReversedWildcardFilterFactory extends SolrTestCaseJ4 {
   Map<String,String> args = new HashMap<String, String>();
-  ReversedWildcardFilterFactory factory = new ReversedWildcardFilterFactory();
   IndexSchema schema;
 
   @BeforeClass
@@ -56,7 +56,7 @@ public class TestReversedWildcardFilterF
   @Before
   public void setUp() throws Exception {
     super.setUp();
-    schema = new IndexSchema(solrConfig, getSchemaFile(), null);
+    schema = IndexSchemaFactory.buildIndexSchema(getSchemaFile(), solrConfig);
     clearIndex();
     assertU(commit());
   }
@@ -65,7 +65,7 @@ public class TestReversedWildcardFilterF
   public void testReversedTokens() throws IOException {
     String text = "simple text";
     args.put("withOriginal", "true");
-    factory.init(args);
+    ReversedWildcardFilterFactory factory = new ReversedWildcardFilterFactory(args);
     TokenStream input = factory.create(new MockTokenizer(new StringReader(text), MockTokenizer.WHITESPACE, false));
     assertTokenStreamContents(input, 
         new String[] { "\u0001elpmis", "simple", "\u0001txet", "text" },
@@ -73,7 +73,7 @@ public class TestReversedWildcardFilterF
 
     // now without original tokens
     args.put("withOriginal", "false");
-    factory.init(args);
+    factory = new ReversedWildcardFilterFactory(args);
     input = factory.create(new MockTokenizer(new StringReader(text), MockTokenizer.WHITESPACE, false));
     assertTokenStreamContents(input,
         new String[] { "\u0001elpmis", "\u0001txet" },

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java Tue May  7 11:20:55 2013
@@ -198,7 +198,6 @@ public class TestWordDelimiterFilterFact
   @Test
   public void testCustomTypes() throws Exception {
     String testText = "I borrowed $5,400.00 at 25% interest-rate";
-    WordDelimiterFilterFactory factoryDefault = new WordDelimiterFilterFactory();
     ResourceLoader loader = new SolrResourceLoader("solr/collection1");
     Map<String,String> args = new HashMap<String,String>();
     args.put("generateWordParts", "1");
@@ -209,7 +208,7 @@ public class TestWordDelimiterFilterFact
     args.put("splitOnCaseChange", "1");
     
     /* default behavior */
-    factoryDefault.init(args);
+    WordDelimiterFilterFactory factoryDefault = new WordDelimiterFilterFactory(args);
     factoryDefault.inform(loader);
     
     TokenStream ts = factoryDefault.create(
@@ -224,10 +223,16 @@ public class TestWordDelimiterFilterFact
 
     
     /* custom behavior */
-    WordDelimiterFilterFactory factoryCustom = new WordDelimiterFilterFactory();
+    args = new HashMap<String,String>();
     // use a custom type mapping
+    args.put("generateWordParts", "1");
+    args.put("generateNumberParts", "1");
+    args.put("catenateWords", "1");
+    args.put("catenateNumbers", "1");
+    args.put("catenateAll", "0");
+    args.put("splitOnCaseChange", "1");
     args.put("types", "wdftypes.txt");
-    factoryCustom.init(args);
+    WordDelimiterFilterFactory factoryCustom = new WordDelimiterFilterFactory(args);
     factoryCustom.inform(loader);
     
     ts = factoryCustom.create(

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/AliasIntegrationTest.java Tue May  7 11:20:55 2013
@@ -25,6 +25,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
+import org.apache.solr.client.solrj.impl.CloudSolrServer;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
@@ -150,6 +151,14 @@ public class AliasIntegrationTest extend
     // create alias, collection2 first because it's not on every node
     createAlias("testalias", "collection2,collection1");
     
+    // search with new cloud client
+    CloudSolrServer cloudSolrServer = new CloudSolrServer(zkServer.getZkAddress());
+    query = new SolrQuery("*:*");
+    query.set("collection", "testalias");
+    res = cloudSolrServer.query(query);
+    cloudSolrServer.shutdown();
+    assertEquals(5, res.getResults().getNumFound());
+    
     // search for alias with random non cloud client
     query = new SolrQuery("*:*");
     query.set("collection", "testalias");

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java Tue May  7 11:20:55 2013
@@ -29,6 +29,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.lucene.util.Constants;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -60,7 +61,7 @@ public class BasicDistributedZk2Test ext
 
   @BeforeClass
   public static void beforeThisClass2() throws Exception {
-
+    assumeFalse("FIXME: This test fails under Java 8 all the time, see SOLR-4711", Constants.JRE_IS_MINIMUM_JAVA8);
   }
   
   public BasicDistributedZk2Test() {
@@ -183,6 +184,7 @@ public class BasicDistributedZk2Test ext
       fail(e.getMessage());
     }
     
+    waitForCollection(cloudClient.getZkStateReader(), ONE_NODE_COLLECTION, 1);
     waitForRecoveriesToFinish(ONE_NODE_COLLECTION, cloudClient.getZkStateReader(), false);
     
     cloudClient.getZkStateReader().getLeaderRetry(ONE_NODE_COLLECTION, "shard1", 30000);
@@ -400,7 +402,7 @@ public class BasicDistributedZk2Test ext
     // make sure we have published we are recovering
     Thread.sleep(1500);
     
-    waitForThingsToLevelOut(15);
+    waitForThingsToLevelOut(30);
     
     Thread.sleep(500);
     

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Tue May  7 11:20:55 2013
@@ -26,6 +26,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Collections;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CompletionService;
 import java.util.concurrent.ExecutorCompletionService;
@@ -34,6 +35,7 @@ import java.util.concurrent.SynchronousQ
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.JSONTestUtil;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -319,6 +321,7 @@ public class BasicDistributedZkTest exte
     // would be better if these where all separate tests - but much, much
     // slower
     doOptimisticLockingAndUpdating();
+    testShardParamVariations();
     testMultipleCollections();
     testANewCollectionInOneInstance();
     testSearchByCollectionName();
@@ -336,6 +339,109 @@ public class BasicDistributedZkTest exte
     }
   }
   
+  private void testShardParamVariations() throws Exception {
+    SolrQuery query = new SolrQuery("*:*");
+    Map<String,Long> shardCounts = new HashMap<String,Long>();
+
+    for (String shard : shardToJetty.keySet()) {
+      // every client should give the same numDocs for this shard
+      // shffle the clients in a diff order for each shard
+      List<SolrServer> solrclients = new ArrayList<SolrServer>(this.clients);
+      Collections.shuffle(solrclients, random());
+      for (SolrServer client : solrclients) {
+        query.set("shards", shard);
+        long numDocs = client.query(query).getResults().getNumFound();
+        assertTrue("numDocs < 0 for shard "+shard+" via "+client,
+                   0 <= numDocs);
+        if (!shardCounts.containsKey(shard)) {
+          shardCounts.put(shard, numDocs);
+        }
+        assertEquals("inconsitent numDocs for shard "+shard+" via "+client,
+                     shardCounts.get(shard).longValue(), numDocs);
+        
+        List<CloudJettyRunner> replicaJetties 
+          = new ArrayList<CloudJettyRunner>(shardToJetty.get(shard));
+        Collections.shuffle(replicaJetties, random());
+
+        // each replica should also give the same numDocs
+        ArrayList<String> replicaAlts = new ArrayList<String>(replicaJetties.size() * 2);
+        for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) {
+          String replica = removeProtocol(replicaJetty.url);
+          query.set("shards", replica);
+
+          // replicas already shuffled, use this in the alternative check below
+          if (0 == random().nextInt(3) || replicaAlts.size() < 2) {
+            replicaAlts.add(replica);
+          }
+
+          numDocs = client.query(query).getResults().getNumFound();
+          assertTrue("numDocs < 0 for replica "+replica+" via "+client,
+                     0 <= numDocs);
+          assertEquals("inconsitent numDocs for shard "+shard+
+                       " in replica "+replica+" via "+client,
+                       shardCounts.get(shard).longValue(), numDocs);
+        }
+
+        // any combination of replica alternatives should give same numDocs
+        String replicas = StringUtils.join(replicaAlts.toArray(), "|");
+        query.set("shards", replicas);
+        numDocs = client.query(query).getResults().getNumFound();
+        assertTrue("numDocs < 0 for replicas "+replicas+" via "+client,
+                   0 <= numDocs);
+          assertEquals("inconsitent numDocs for replicas "+replicas+
+                       " via "+client,
+                       shardCounts.get(shard).longValue(), numDocs);
+      }
+    }
+
+    // sums of multiple shards should add up regardless of how we 
+    // query those shards or which client we use
+    long randomShardCountsExpected = 0;
+    ArrayList<String> randomShards = new ArrayList<String>(shardCounts.size());
+    for (Map.Entry<String,Long> shardData : shardCounts.entrySet()) {
+      if (random().nextBoolean() || randomShards.size() < 2) {
+        String shard = shardData.getKey();
+        randomShardCountsExpected += shardData.getValue();
+        if (random().nextBoolean()) {
+          // use shard id
+          randomShards.add(shard);
+        } else {
+          // use some set explicit replicas
+          ArrayList<String> replicas = new ArrayList<String>(7);
+          for (CloudJettyRunner replicaJetty : shardToJetty.get(shard)) {
+            if (0 == random().nextInt(3) || 0 == replicas.size()) {
+              replicas.add(removeProtocol(replicaJetty.url));
+            }
+          }
+          Collections.shuffle(replicas, random());
+          randomShards.add(StringUtils.join(replicas, "|"));
+        }
+      }
+    }
+    String randShards = StringUtils.join(randomShards, ",");
+    query.set("shards", randShards);
+    for (SolrServer client : this.clients) {
+      assertEquals("numDocs for "+randShards+" via "+client,
+                   randomShardCountsExpected, 
+                   client.query(query).getResults().getNumFound());
+    }
+
+    // total num docs must match sum of every shard's numDocs
+    query = new SolrQuery("*:*");
+    long totalShardNumDocs = 0;
+    for (Long c : shardCounts.values()) {
+      totalShardNumDocs += c;
+    }
+    for (SolrServer client : clients) {
+      assertEquals("sum of shard numDocs on client: " + client, 
+                   totalShardNumDocs,
+                   client.query(query).getResults().getNumFound());
+    }
+    assertTrue("total numDocs <= 0, WTF? Test is useless",
+               0 < totalShardNumDocs);
+
+  }
+
   private void testStopAndStartCoresInOneInstance() throws Exception {
     SolrServer client = clients.get(0);
     String url3 = getBaseUrl(client);
@@ -980,4 +1086,11 @@ public class BasicDistributedZkTest exte
     // insurance
     DirectUpdateHandler2.commitOnClose = true;
   }
+
+  /**
+   * Given a URL as a string, removes the leading protocol from that string
+   */
+  private static String removeProtocol(String url) {
+    return url.replaceFirst("^[^:/]{1,20}:/+","");
+  }
 }

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java Tue May  7 11:20:55 2013
@@ -41,6 +41,7 @@ import javax.management.MBeanServer;
 import javax.management.MBeanServerFactory;
 import javax.management.ObjectName;
 
+import org.apache.lucene.util.Constants;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util._TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
@@ -95,7 +96,7 @@ public class CollectionsAPIDistributedZk
   
   @BeforeClass
   public static void beforeThisClass2() throws Exception {
-
+    assumeFalse("FIXME: This test fails under Java 8 all the time, see SOLR-4711", Constants.JRE_IS_MINIMUM_JAVA8);
   }
   
   @Before
@@ -141,12 +142,11 @@ public class CollectionsAPIDistributedZk
   
   @Override
   public void doTest() throws Exception {
-    
     testNodesUsedByCreate();
     testCollectionsAPI();
-    deletePartiallyCreatedCollection();
     testErrorHandling();
-
+    deletePartiallyCreatedCollection();
+    deleteCollectionWithDownNodes();
     if (DEBUG) {
       super.printLayout();
     }
@@ -182,7 +182,36 @@ public class CollectionsAPIDistributedZk
     request = new QueryRequest(params);
     request.setPath("/admin/collections");
     resp = createNewSolrServer("", baseUrl).request(request);
-
+  }
+  
+  
+  private void deleteCollectionWithDownNodes() throws Exception {
+    String baseUrl = getBaseUrl((HttpSolrServer) clients.get(0));
+    // now try to remove a collection when a couple of it's nodes are down
+    createCollection(null, "halfdeletedcollection2", 3, 2, 6,
+        createNewSolrServer("", baseUrl), null);
+    
+    waitForRecoveriesToFinish("halfdeletedcollection2", false);
+    
+    // stop a couple nodes
+    ChaosMonkey.stop(jettys.get(0));
+    ChaosMonkey.stop(jettys.get(1));
+    
+    baseUrl = getBaseUrl((HttpSolrServer) clients.get(2));
+    
+    // remove a collection
+    ModifiableSolrParams params = new ModifiableSolrParams();
+    params.set("action", CollectionAction.DELETE.toString());
+    params.set("name", "halfdeletedcollection2");
+    QueryRequest request = new QueryRequest(params);
+    request.setPath("/admin/collections");
+    
+    createNewSolrServer("", baseUrl).request(request);
+    
+    cloudClient.getZkStateReader().updateClusterState(true);
+    assertFalse(cloudClient.getZkStateReader().getClusterState()
+        .getCollections().contains("halfdeletedcollection2"));
+    
   }
 
   private void testErrorHandling() throws Exception {

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SliceStateUpdateTest.java Tue May  7 11:20:55 2013
@@ -171,7 +171,7 @@ public class SliceStateUpdateTest extend
     Map<String, Slice> slices = null;
     for (int i = 75; i > 0; i--) {
       clusterState2 = zkController2.getClusterState();
-      slices = clusterState2.getAllSlicesMap("collection1");
+      slices = clusterState2.getSlicesMap("collection1");
       if (slices != null && slices.containsKey("shard1")
           && slices.get("shard1").getState().equals("inactive")) {
         break;

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java Tue May  7 11:20:55 2013
@@ -50,6 +50,7 @@ import org.junit.BeforeClass;
  */
 @Slow
 public class SyncSliceTest extends AbstractFullDistribZkTestBase {
+  private boolean success = false;
   
   @BeforeClass
   public static void beforeSuperClass() throws Exception {
@@ -73,6 +74,9 @@ public class SyncSliceTest extends Abstr
   @Override
   @After
   public void tearDown() throws Exception {
+    if (!success) {
+      printLayoutOnTearDown = true;
+    }
     super.tearDown();
     resetExceptionIgnores();
   }
@@ -188,8 +192,9 @@ public class SyncSliceTest extends Abstr
     skipServers.addAll( getRandomOtherJetty(leaderJetty, deadJetty));
     // skip list should be 
     
-    //System.out.println("leader:" + leaderJetty.url);
-    //System.out.println("skip list:" + skipServers);
+//    System.out.println("leader:" + leaderJetty.url);
+//    System.out.println("dead:" + deadJetty.url);
+//    System.out.println("skip list:" + skipServers);
     
     // we are skipping  2 nodes
     assertEquals(2, skipServers.size());
@@ -232,6 +237,7 @@ public class SyncSliceTest extends Abstr
 
     checkShardConsistency(true, true);
     
+    success = true;
   }
 
   private void waitTillRecovered() throws Exception {

Modified: lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java?rev=1479862&r1=1479861&r2=1479862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java Tue May  7 11:20:55 2013
@@ -25,6 +25,7 @@ import java.util.concurrent.ThreadPoolEx
 import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.Constants;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -50,7 +51,7 @@ public class UnloadDistributedZkTest ext
   
   @BeforeClass
   public static void beforeThisClass3() throws Exception {
-
+    assumeFalse("FIXME: This test fails under Java 8 all the time, see SOLR-4711", Constants.JRE_IS_MINIMUM_JAVA8);
   }
   
   @Before
@@ -109,6 +110,9 @@ public class UnloadDistributedZkTest ext
     createCmd.setDataDir(coreDataDir);
     
     server.request(createCmd);
+    
+    // does not mean they are active and up yet :*
+    waitForRecoveriesToFinish(collection, false);
 
     // now unload one of the two
     Unload unloadCmd = new Unload(false);



Mime
View raw message