lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1513364 [4/5] - in /lucene/dev/branches/lucene3069: ./ dev-tools/ dev-tools/idea/solr/core/src/java/ dev-tools/idea/solr/core/src/test/ dev-tools/maven/ dev-tools/maven/solr/core/src/java/ dev-tools/maven/solr/core/src/test/ dev-tools/scri...
Date Tue, 13 Aug 2013 06:33:34 GMT
Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <dataDir>${solr.data.dir:}</dataDir>
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <dataDir>${solr.data.dir:}</dataDir>
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <dataDir>${solr.data.dir:}</dataDir>
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml Tue Aug 13 06:33:29 2013
@@ -36,6 +36,10 @@
       <bool name="useCompoundFile">${useCompoundFile:false}</bool>
 
     </mergePolicy>
+    <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler">
+      <int name="maxMergeCount">987</int>
+      <int name="maxThreadCount">42</int>
+    </mergeScheduler>
   </indexConfig>
 
   <requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
   <dataDir>${solr.data.dir:}</dataDir>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
   <dataDir>${solr.data.dir:}</dataDir>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml Tue Aug 13 06:33:29 2013
@@ -22,10 +22,7 @@
   <dataDir>${solr.data.dir:}</dataDir>
   <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
 
-  <indexConfig>
-    <lockType>single</lockType>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml Tue Aug 13 06:33:29 2013
@@ -32,7 +32,6 @@
 
   <indexConfig>
     <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-    <termIndexInterval>256</termIndexInterval>
     <mergePolicy class="org.apache.lucene.index.TieredMergePolicy"/>
     <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
   </indexConfig>
@@ -40,9 +39,7 @@
   <updateHandler class="solr.DirectUpdateHandler2">
   </updateHandler>
 
-  <indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
-    <int name="setTermIndexDivisor">12</int>
-  </indexReaderFactory >
+  <indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory"/>
 
   <requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
 

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml Tue Aug 13 06:33:29 2013
@@ -22,5 +22,26 @@ A solrconfig.xml snippet containing inde
 
 -->
 <indexConfig>
+  <!-- this sys property is not set by SolrTestCaseJ4 because we ideally want to use
+       the RandomMergePolicy in all tests - but some tests expect very specific
+       Merge behavior, so those tests can set it as needed.
+  -->
+  <mergePolicy class="${solr.tests.mergePolicy:org.apache.solr.util.RandomMergePolicy}" />
+  
   <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
+
+  <maxBufferedDocs>${solr.tests.maxBufferedDocs}</maxBufferedDocs>
+  <maxIndexingThreads>${solr.tests.maxIndexingThreads}</maxIndexingThreads>
+  <ramBufferSizeMB>${solr.tests.ramBufferSizeMB}</ramBufferSizeMB>
+
+  <mergeScheduler class="${solr.tests.mergeScheduler}" />
+
+  <writeLockTimeout>1000</writeLockTimeout>
+  <commitLockTimeout>10000</commitLockTimeout>
+
+  <!-- this sys property is not set by SolrTestCaseJ4 because almost all tests should
+       use the single process lockType for speed - but tests that explicitly need
+       to vary the lockType canset it as needed.
+  -->
+  <lockType>${solr.tests.lockType:single}</lockType>
 </indexConfig>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml Tue Aug 13 06:33:29 2013
@@ -49,20 +49,8 @@
 
   <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
 
-  <indexConfig>
-    <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
-    <writeLockTimeout>1000</writeLockTimeout>
-    <mergeFactor>8</mergeFactor>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-    <!-- for better multi-segment testing, we are using slower
-    indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
-    -->
-    <maxBufferedDocs>10</maxBufferedDocs>
-    <mergePolicy class="org.apache.lucene.index.LogDocMergePolicy"/>
-    <lockType>native</lockType>
-    <unlockOnStartup>true</unlockOnStartup>
-  </indexConfig>
-  
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
   <updateHandler class="solr.DirectUpdateHandler2">
 
     <!-- autocommit pending docs if certain criteria are met
@@ -132,6 +120,12 @@
       initialSize="512"
       autowarmCount="0"/>
 
+    <cache name="perSegFilter"
+      class="solr.search.LRUCache"
+      size="10"
+      initialSize="0"
+      autowarmCount="10" />
+
     <!-- If true, stored fields that are not requested will be loaded lazily.
     -->
     <enableLazyFieldLoading>true</enableLazyFieldLoading>
@@ -565,3 +559,4 @@
   </updateRequestProcessorChain>  
 
 </config>
+

Modified: lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/crazy-path-to-config.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/crazy-path-to-config.xml?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/crazy-path-to-config.xml (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test-files/solr/crazy-path-to-config.xml Tue Aug 13 06:33:29 2013
@@ -24,10 +24,7 @@
 <config>
   <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
 
-  <indexConfig>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-    <lockType>single</lockType>
-  </indexConfig>
+  <xi:include href="collection1/conf/solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
   <updateHandler class="solr.DirectUpdateHandler2">
     <commitIntervalLowerBound>0</commitIntervalLowerBound>

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java Tue Aug 13 06:33:29 2013
@@ -31,7 +31,6 @@ import javax.xml.parsers.DocumentBuilder
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.LazyDocument;
 import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.LogMergePolicy;
 import org.apache.lucene.index.StorableField;
 import org.apache.lucene.index.StoredDocument;
 import org.apache.lucene.store.Directory;
@@ -127,30 +126,11 @@ public class BasicFunctionalityTest exte
   public void testSomeStuff() throws Exception {
     clearIndex();
 
-    // test merge factor picked up
-    // and for rate limited settings
     SolrCore core = h.getCore();
 
-    RefCounted<IndexWriter> iwr = ((DirectUpdateHandler2) core
-        .getUpdateHandler()).getSolrCoreState().getIndexWriter(core);
-    try {
-      IndexWriter iw = iwr.get();
-      assertEquals("Mergefactor was not picked up", 8, ((LogMergePolicy) iw.getConfig().getMergePolicy()).getMergeFactor());
-      
-      Directory dir = iw.getDirectory();
-      
-      if (dir instanceof MockDirectoryWrapper) {
-        dir = ((MockDirectoryWrapper)dir).getDelegate();
-      }
-      
-      assertTrue(dir.getClass().getName(), dir instanceof RateLimitedDirectoryWrapper);
-      assertEquals(Double.valueOf(1000000), ((RateLimitedDirectoryWrapper)dir).getMaxWriteMBPerSec(Context.DEFAULT));
-      assertEquals(Double.valueOf(2000000), ((RateLimitedDirectoryWrapper)dir).getMaxWriteMBPerSec(Context.FLUSH));
-      assertEquals(Double.valueOf(3000000), ((RateLimitedDirectoryWrapper)dir).getMaxWriteMBPerSec(Context.MERGE));
-      assertEquals(Double.valueOf(4000000), ((RateLimitedDirectoryWrapper)dir).getMaxWriteMBPerSec(Context.READ));
-    } finally {
-      iwr.decref();
-    }
+    // test that we got the expected config, not just hardcoded defaults
+    assertNotNull(core.getRequestHandler("mock"));
+
     // test stats call
     NamedList stats = core.getStatistics();
     assertEquals("collection1", stats.get("coreName"));

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java Tue Aug 13 06:33:29 2013
@@ -1121,7 +1121,7 @@ public class ConvertedLegacyTest extends
                                     "standard", 0, 10, args);
     assertQ(req
             ,"//str[.='Yonik']"
-            ,"//float[.='2.9459102']"
+            ,"//float[@name='score' and . > 0]"
             );
 
     // test addition of score field

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/TestGroupingSearch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/TestGroupingSearch.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/TestGroupingSearch.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/TestGroupingSearch.java Tue Aug 13 06:33:29 2013
@@ -18,6 +18,7 @@
 package org.apache.solr;
 
 import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.index.LogDocMergePolicy;
 import org.noggit.JSONUtil;
 import org.noggit.ObjectBuilder;
 import org.apache.solr.client.solrj.impl.BinaryResponseParser;
@@ -54,6 +55,11 @@ public class TestGroupingSearch extends 
 
   @BeforeClass
   public static void beforeTests() throws Exception {
+    // force LogDocMergePolicy so that we get a predictable doc order
+    // when doing unsorted group collection
+    System.setProperty("solr.tests.mergePolicy", 
+                       LogDocMergePolicy.class.getName());
+
     System.setProperty("enable.update.log", "false"); // schema12 doesn't support _version_
     initCore("solrconfig.xml", "schema12.xml");
   }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java Tue Aug 13 06:33:29 2013
@@ -18,7 +18,6 @@ package org.apache.solr.cloud;
  */
 
 import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.LogMergePolicy;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
@@ -58,16 +57,12 @@ public class BasicZkTest extends Abstrac
     h.getCoreContainer().getZkController().getZkStateReader().getLeaderUrl("collection1", "shard1", 30000);
     
     ZkController zkController = h.getCoreContainer().getZkController();
-    
-    // test merge factor picked up
+
     SolrCore core = h.getCore();
 
-    RefCounted<IndexWriter> iw = ((DirectUpdateHandler2)core.getUpdateHandler()).getSolrCoreState().getIndexWriter(core);
-    try {
-      assertEquals("Mergefactor was not picked up", 8, ((LogMergePolicy)iw.get().getConfig().getMergePolicy()).getMergeFactor());
-    } finally {
-      iw.decref();
-    }
+    // test that we got the expected config, not just hardcoded defaults
+    assertNotNull(core.getRequestHandler("mock"));
+
     lrf.args.put(CommonParams.VERSION, "2.2");
     assertQ("test query on empty index", request("qlkciyopsbgzyvkylsjhchghjrdf"),
         "//result[@numFound='0']");

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java Tue Aug 13 06:33:29 2013
@@ -17,30 +17,6 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.Future;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-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;
@@ -50,8 +26,8 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.impl.CloudSolrServer;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.request.CoreAdminRequest;
-import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.CoreAdminRequest.Create;
+import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.response.CoreAdminResponse;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrException;
@@ -78,6 +54,31 @@ import org.apache.solr.util.DefaultSolrT
 import org.junit.Before;
 import org.junit.BeforeClass;
 
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.CompletionService;
+import java.util.concurrent.ExecutorCompletionService;
+import java.util.concurrent.Future;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.solr.cloud.OverseerCollectionProcessor.REPLICATION_FACTOR;
+
 /**
  * Tests the Cloud Collections API.
  */
@@ -260,7 +261,7 @@ public class CollectionsAPIDistributedZk
     collectionName = "collection";
     params.set("name", collectionName);
     params.set("numShards", 2);
-    params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 10);
+    params.set(REPLICATION_FACTOR, 10);
     request = new QueryRequest(params);
     request.setPath("/admin/collections");
     gotExp = false;
@@ -277,7 +278,7 @@ public class CollectionsAPIDistributedZk
     params.set("action", CollectionAction.CREATE.toString());
     collectionName = "acollection";
     params.set("name", collectionName);
-    params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 10);
+    params.set(REPLICATION_FACTOR, 10);
     request = new QueryRequest(params);
     request.setPath("/admin/collections");
     gotExp = false;
@@ -294,7 +295,7 @@ public class CollectionsAPIDistributedZk
     params.set("action", CollectionAction.CREATE.toString());
     collectionName = "acollection";
     params.set("name", collectionName);
-    params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 10);
+    params.set(REPLICATION_FACTOR, 10);
     params.set("numShards", 0);
     request = new QueryRequest(params);
     request.setPath("/admin/collections");
@@ -361,7 +362,7 @@ public class CollectionsAPIDistributedZk
     params.set("action", CollectionAction.CREATE.toString());
 
     params.set("numShards", 2);
-    params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 2);
+    params.set(REPLICATION_FACTOR, 2);
     String collectionName = "nodes_used_collection";
 
     params.set("name", collectionName);
@@ -373,7 +374,7 @@ public class CollectionsAPIDistributedZk
     numShardsNumReplicaList.add(2);
     numShardsNumReplicaList.add(2);
     checkForCollection("nodes_used_collection", numShardsNumReplicaList , null);
-    
+
     List<String> createNodeList = new ArrayList<String>();
 
     Set<String> liveNodes = cloudClient.getZkStateReader().getClusterState()
@@ -382,7 +383,7 @@ public class CollectionsAPIDistributedZk
     for (String node : liveNodes) {
       createNodeList.add(node);
     }
-    
+
     DocCollection col = cloudClient.getZkStateReader().getClusterState().getCollection("nodes_used_collection");
     Collection<Slice> slices = col.getSlices();
     for (Slice slice : slices) {
@@ -394,7 +395,7 @@ public class CollectionsAPIDistributedZk
     assertEquals(createNodeList.toString(), 1, createNodeList.size());
 
   }
-  
+
   private void testCollectionsAPI() throws Exception {
  
     // TODO: fragile - because we dont pass collection.confName, it will only
@@ -545,7 +546,7 @@ public class CollectionsAPIDistributedZk
     params.set("action", CollectionAction.CREATE.toString());
 
     params.set("numShards", 1);
-    params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 2);
+    params.set(REPLICATION_FACTOR, 2);
     collectionName = "acollectionafterbaddelete";
 
     params.set("name", collectionName);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java Tue Aug 13 06:33:29 2013
@@ -121,6 +121,8 @@ public class FullSolrCloudDistribCmdsTes
     results = query(cloudClient);
     assertEquals(2, results.getResults().getNumFound());
     
+    docId = testIndexQueryDeleteHierarchical(docId);
+    
     testIndexingWithSuss();
     
     // TODO: testOptimisticUpdate(results);
@@ -235,6 +237,75 @@ public class FullSolrCloudDistribCmdsTes
     assertEquals(0, query(cloudClient).getResults().getNumFound());
   }
 
+  private long testIndexQueryDeleteHierarchical(long docId) throws Exception {
+    //index
+    int topDocsNum = atLeast(10);
+    int childsNum = atLeast(10);
+    for (int i = 0; i < topDocsNum; ++i) {
+      UpdateRequest uReq = new UpdateRequest();
+      SolrInputDocument topDocument = new SolrInputDocument();
+      topDocument.addField("id", docId++);
+      topDocument.addField("type_s", "parent");
+      topDocument.addField(i + "parent_f1_s", "v1");
+      topDocument.addField(i + "parent_f2_s", "v2");
+      
+      
+      for (int index = 0; index < childsNum; ++index) {
+        docId = addChildren("child", topDocument, index, false, docId);
+      }
+      
+      uReq.add(topDocument);
+      uReq.process(cloudClient);
+      uReq.process(controlClient);
+    }
+    
+    commit();
+    checkShardConsistency();
+    assertDocCounts(VERBOSE);
+    
+    //query
+    // parents
+    SolrQuery query = new SolrQuery("type_s:parent");
+    QueryResponse results = cloudClient.query(query);
+    assertEquals(topDocsNum, results.getResults().getNumFound());
+    
+    //childs 
+    query = new SolrQuery("type_s:child");
+    results = cloudClient.query(query);
+    assertEquals(topDocsNum * childsNum, results.getResults().getNumFound());
+    
+    //grandchilds
+    query = new SolrQuery("type_s:grand");
+    results = cloudClient.query(query);
+    //each topDoc has t childs where each child has x = 0 + 2 + 4 + ..(t-1)*2 grands
+    //x = 2 * (1 + 2 + 3 +.. (t-1)) => arithmetic summ of t-1 
+    //x = 2 * ((t-1) * t / 2) = t * (t - 1)
+    assertEquals(topDocsNum * childsNum * (childsNum - 1), results.getResults().getNumFound());
+    
+    //delete
+    del("*:*");
+    commit();
+    
+    return docId;
+  }
+  
+  private long addChildren(String prefix, SolrInputDocument topDocument, int childIndex, boolean lastLevel, long docId) {
+    SolrInputDocument childDocument = new SolrInputDocument();
+    childDocument.addField("id", docId++);
+    childDocument.addField("type_s", prefix);
+    for (int index = 0; index < childIndex; ++index) {
+      childDocument.addField(childIndex + prefix + index + "_s", childIndex + "value"+ index);
+    }   
+  
+    if (!lastLevel) {
+      for (int i = 0; i < childIndex * 2; ++i) {
+        docId = addChildren("grand", childDocument, i, true, docId);
+      }
+    }
+    topDocument.addChildDocument(childDocument);
+    return docId;
+  }
+  
   private void testIndexingWithSuss() throws Exception {
     ConcurrentUpdateSolrServer suss = new ConcurrentUpdateSolrServer(
         ((HttpSolrServer) clients.get(0)).getBaseURL(), 3, 1);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionProcessorTest.java Tue Aug 13 06:33:29 2013
@@ -17,25 +17,6 @@ package org.apache.solr.cloud;
  * limitations under the License.
  */
 
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.reset;
-import static org.easymock.EasyMock.verify;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Queue;
-import java.util.Set;
-
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrResponse;
 import org.apache.solr.client.solrj.response.QueryResponse;
@@ -51,8 +32,8 @@ import org.apache.solr.common.util.StrUt
 import org.apache.solr.handler.component.ShardHandler;
 import org.apache.solr.handler.component.ShardRequest;
 import org.apache.solr.handler.component.ShardResponse;
+import org.apache.zookeeper.CreateMode;
 import org.easymock.Capture;
-import org.easymock.EasyMock;
 import org.easymock.IAnswer;
 import org.eclipse.jetty.util.BlockingArrayQueue;
 import org.junit.After;
@@ -61,6 +42,27 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Queue;
+import java.util.Set;
+
+import static org.easymock.EasyMock.anyBoolean;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.getCurrentArguments;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.reset;
+import static org.easymock.EasyMock.verify;
+
 public class OverseerCollectionProcessorTest extends SolrTestCaseJ4 {
   
   private static final String ADMIN_PATH = "/admin/cores";
@@ -72,12 +74,14 @@ public class OverseerCollectionProcessor
   private static ZkStateReader zkStateReaderMock;
   private static ClusterState clusterStateMock;
   private static SolrZkClient solrZkClientMock;
-  
+  private final Map zkMap = new HashMap();
+  private final Set collectionsSet = new HashSet();
+
   private OverseerCollectionProcessorToBeTested underTest;
   
   private Thread thread;
   private Queue<QueueEvent> queue = new BlockingArrayQueue<QueueEvent>();
-  
+
   private class OverseerCollectionProcessorToBeTested extends
       OverseerCollectionProcessor {
     
@@ -92,6 +96,7 @@ public class OverseerCollectionProcessor
     @Override
     protected SolrResponse processMessage(ZkNodeProps message, String operation) {
       lastProcessMessageResult = super.processMessage(message, operation);
+      log.info("1 : "+System.currentTimeMillis());
       return lastProcessMessageResult;
     }
     
@@ -123,6 +128,7 @@ public class OverseerCollectionProcessor
   @Before
   public void setUp() throws Exception {
     super.setUp();
+    queue.clear();
     reset(workQueueMock);
     reset(workQueueMock);
     reset(shardHandlerMock);
@@ -131,6 +137,8 @@ public class OverseerCollectionProcessor
     reset(solrZkClientMock);
     underTest = new OverseerCollectionProcessorToBeTested(zkStateReaderMock,
         "1234", shardHandlerMock, ADMIN_PATH, workQueueMock);
+    zkMap.clear();
+    collectionsSet.clear();
   }
   
   @After
@@ -156,7 +164,7 @@ public class OverseerCollectionProcessor
     expectLastCall().andAnswer(new IAnswer<Object>() {
       @Override
       public Object answer() throws Throwable {
-        queue.remove((QueueEvent)EasyMock.getCurrentArguments()[0]);
+        queue.remove((QueueEvent) getCurrentArguments()[0]);
         return null;
       }
     }).anyTimes();
@@ -190,7 +198,7 @@ public class OverseerCollectionProcessor
     expectLastCall().andAnswer(new IAnswer<Object>() {
       @Override
       public Object answer() throws Throwable {
-        return new HashSet<String>();
+        return collectionsSet;
       }
     }).anyTimes();
     final Set<String> liveNodes = new HashSet<String>();
@@ -216,10 +224,59 @@ public class OverseerCollectionProcessor
         return liveNodes;
       }
     }).anyTimes();
+    solrZkClientMock.create(anyObject(String.class), anyObject(byte[].class), anyObject(CreateMode.class), anyBoolean());
+    expectLastCall().andAnswer(new IAnswer<String>() {
+      @Override
+      public String answer() throws Throwable {
+        String key = (String) getCurrentArguments()[0];
+        zkMap.put(key, null);
+        handleCrateCollMessage((byte[]) getCurrentArguments()[1]);
+        return key;
+      }
+    }).anyTimes();
+
+    solrZkClientMock.create(anyObject(String.class), anyObject(byte[].class), anyObject(List.class),anyObject(CreateMode.class), anyBoolean());
+    expectLastCall().andAnswer(new IAnswer<String>() {
+      @Override
+      public String answer() throws Throwable {
+        String key = (String) getCurrentArguments()[0];
+        zkMap.put(key, null);
+        handleCrateCollMessage((byte[]) getCurrentArguments()[1]);
+        return key;
+      }
+    }).anyTimes();
+
+    solrZkClientMock.makePath(anyObject(String.class), anyObject(byte[].class), anyBoolean());
+    expectLastCall().andAnswer(new IAnswer<String>() {
+      @Override
+      public String answer() throws Throwable {
+        String key = (String) getCurrentArguments()[0];
+        return key;
+      }
+    }).anyTimes();
+
+    solrZkClientMock.exists(anyObject(String.class),anyBoolean());
+    expectLastCall().andAnswer(new IAnswer<Boolean>() {
+      @Override
+      public Boolean answer() throws Throwable {
+        String key = (String) getCurrentArguments()[0];
+        return zkMap.containsKey(key);
+      }
+    }).anyTimes();
     
     return liveNodes;
   }
-  
+
+  private void handleCrateCollMessage(byte[] bytes) {
+    try {
+      ZkNodeProps props = ZkNodeProps.load(bytes);
+      if("createcollection".equals(props.getStr("operation"))){
+        String collName = props.getStr("name") ;
+        if(collName != null) collectionsSet.add(collName);
+      }
+    } catch (Exception e) { }
+  }
+
   protected void startComponentUnderTest() {
     thread = new Thread(underTest);
     thread.start();
@@ -408,8 +465,8 @@ public class OverseerCollectionProcessor
   protected void waitForEmptyQueue(long maxWait) throws Exception {
     long start = System.currentTimeMillis();
     while (queue.peek() != null) {
-      if ((System.currentTimeMillis() - start) > maxWait) fail("Queue not empty within "
-          + maxWait + " ms");
+      if ((System.currentTimeMillis() - start) > maxWait) fail(" Queue not empty within "
+          + maxWait + " ms" + System.currentTimeMillis());
       Thread.sleep(100);
     }
   }
@@ -445,10 +502,12 @@ public class OverseerCollectionProcessor
     replay(zkStateReaderMock);
     replay(clusterStateMock);
     replay(shardHandlerMock);
+
+    log.info("clusterstate " +clusterStateMock.hashCode());
+
     startComponentUnderTest();
     
     issueCreateJob(numberOfSlices, replicationFactor, maxShardsPerNode, (createNodeListOption != CreateNodeListOptions.SEND_NULL)?createNodeList:null, (createNodeListOption != CreateNodeListOptions.DONT_SEND));
-    
     waitForEmptyQueue(10000);
     
     if (collectionExceptedToBeCreated) {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java Tue Aug 13 06:33:29 2013
@@ -163,7 +163,7 @@ public class ZkControllerTest extends So
       cc = getCoreContainer();
       
       ZkController zkController = new ZkController(cc, server.getZkAddress(), TIMEOUT, 10000,
-          "127.0.0.1", "8983", "solr", "0", true, 10000, 10000, new CurrentCoreDescriptorProvider() {
+          "127.0.0.1", "8983", "solr", 0, true, 10000, 10000, new CurrentCoreDescriptorProvider() {
             
             @Override
             public List<CoreDescriptor> getCurrentDescriptors() {
@@ -203,7 +203,7 @@ public class ZkControllerTest extends So
       cc = getCoreContainer();
       
       zkController = new ZkController(cc, server.getZkAddress(),
-          TIMEOUT, 10000, "127.0.0.1", "8983", "solr", "0", true, 10000, 10000, new CurrentCoreDescriptorProvider() {
+          TIMEOUT, 10000, "127.0.0.1", "8983", "solr", 0, true, 10000, 10000, new CurrentCoreDescriptorProvider() {
             
             @Override
             public List<CoreDescriptor> getCurrentDescriptors() {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java Tue Aug 13 06:33:29 2013
@@ -25,21 +25,29 @@ import org.apache.solr.SolrTestCaseJ4;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+/**
+ * test that configs can override the DirectoryFactory and 
+ * IndexReaderFactory used in solr.
+ */
 public class AlternateDirectoryTest extends SolrTestCaseJ4 {
   @BeforeClass
   public static void beforeClass() throws Exception {
     initCore("solrconfig-altdirectory.xml", "schema.xml");
   }
 
-  /**
-   * Simple test to ensure that alternate IndexReaderFactory is being used.
-   */
-  @Test
   public void testAltDirectoryUsed() throws Exception {
     assertQ(req("q","*:*","qt","standard"));
     assertTrue(TestFSDirectoryFactory.openCalled);
     assertTrue(TestIndexReaderFactory.newReaderCalled);
   }
+  
+  public void testAltReaderUsed() throws Exception {
+    IndexReaderFactory readerFactory = h.getCore().getIndexReaderFactory();
+    assertNotNull("Factory is null", readerFactory);
+    assertEquals("readerFactory is wrong class",
+                 AlternateDirectoryTest.TestIndexReaderFactory.class.getName(), 
+                 readerFactory.getClass().getName());
+  }
 
   static public class TestFSDirectoryFactory extends StandardDirectoryFactory {
     public static volatile boolean openCalled = false;

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java Tue Aug 13 06:33:29 2013
@@ -62,12 +62,14 @@ public class SolrCoreCheckLockOnStartupT
 
     ignoreException("locked");
     try {
+      System.setProperty("solr.tests.lockType","simple");
       //opening a new core on the same index
-      initCore("solrconfig-simplelock.xml", "schema.xml");
+      initCore("solrconfig-basic.xml", "schema.xml");
       if (checkForCoreInitException(LockObtainFailedException.class))
         return;
       fail("Expected " + LockObtainFailedException.class.getSimpleName());
     } finally {
+      System.clearProperty("solr.tests.lockType");
       unIgnoreException("locked");
       indexWriter.close();
       directory.close();
@@ -86,13 +88,15 @@ public class SolrCoreCheckLockOnStartupT
 
     ignoreException("locked");
     try {
+      System.setProperty("solr.tests.lockType","native");
       //opening a new core on the same index
-      initCore("solrconfig-nativelock.xml", "schema.xml");
+      initCore("solrconfig-basic.xml", "schema.xml");
       CoreContainer cc = h.getCoreContainer();
       if (checkForCoreInitException(LockObtainFailedException.class))
         return;
       fail("Expected " + LockObtainFailedException.class.getSimpleName());
     } finally {
+      System.clearProperty("solr.tests.lockType");
       unIgnoreException("locked");
       indexWriter.close();
       directory.close();

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestBadConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestBadConfig.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestBadConfig.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestBadConfig.java Tue Aug 13 06:33:29 2013
@@ -27,6 +27,15 @@ public class TestBadConfig extends Abstr
     assertConfigs("bad_solrconfig.xml","schema.xml","unset.sys.property");
   }
 
+  public void testMultipleIndexConfigs() throws Exception {
+      assertConfigs("bad-solrconfig-multiple-indexconfigs.xml", "schema12.xml",
+                    "indexConfig");
+  }
+  public void testMultipleCFS() throws Exception {
+      assertConfigs("bad-solrconfig-multiple-cfs.xml", "schema12.xml",
+                    "useCompoundFile");
+  }
+
   public void testUpdateLogButNoVersionField() throws Exception {
     
     System.setProperty("enable.update.log", "true");

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestConfig.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestConfig.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestConfig.java Tue Aug 13 06:33:29 2013
@@ -114,27 +114,6 @@ public class TestConfig extends SolrTest
     assertTrue(handler.getHiddenFiles().contains("PROTWORDS.TXT"));
   }
 
-  @Test
-  public void testTermIndexInterval() throws Exception {
-    RefCounted<IndexWriter> iw = ((DirectUpdateHandler2) h.getCore()
-        .getUpdateHandler()).getSolrCoreState().getIndexWriter(h.getCore());
-    int interval = 0;
-    try {
-      IndexWriter writer = iw.get();
-      interval = writer.getConfig().getTermIndexInterval();
-    } finally {
-      iw.decref();
-    }
-    assertEquals(256, interval);
-  }
-
-  @Test
-  public void testTermIndexDivisor() throws Exception {
-    IndexReaderFactory irf = h.getCore().getIndexReaderFactory();
-    StandardIndexReaderFactory sirf = (StandardIndexReaderFactory) irf;
-    assertEquals(12, sirf.termInfosIndexDivisor);
-  }
-
   // If defaults change, add test methods to cover each version
   @Test
   public void testDefaults() throws Exception {
@@ -150,14 +129,15 @@ public class TestConfig extends SolrTest
 
   // sanity check that sys propertis are working as expected
   public void testSanityCheckTestSysPropsAreUsed() throws Exception {
-    final boolean expectCFS 
-      = Boolean.parseBoolean(System.getProperty("useCompoundFile"));
 
     SolrConfig sc = new SolrConfig(new SolrResourceLoader("solr/collection1"), "solrconfig-basic.xml", null);
     SolrIndexConfig sic = sc.indexConfig;
-    assertEquals("default ramBufferSizeMB", 100.0D, sic.ramBufferSizeMB, 0.0D);
-    assertEquals("default LockType", SolrIndexConfig.LOCK_TYPE_NATIVE, sic.lockType);
-    assertEquals("useCompoundFile sysprop", expectCFS, sic.useCompoundFile);
+
+    assertEquals("ramBufferSizeMB sysprop", 
+                 Double.parseDouble(System.getProperty("solr.tests.ramBufferSizeMB")), 
+                                    sic.ramBufferSizeMB, 0.0D);
+    assertEquals("useCompoundFile sysprop", 
+                 Boolean.parseBoolean(System.getProperty("useCompoundFile")), sic.useCompoundFile);
   }
 
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java Tue Aug 13 06:33:29 2013
@@ -81,7 +81,6 @@ public class TestCoreContainer extends S
     System.setProperty("shareSchema", "true");
     final CoreContainer cores = init("_shareSchema");
     try {
-      cores.setPersistent(false);
       assertTrue(cores.isShareSchema());
       
       CoreDescriptor descriptor1 = new CoreDescriptor(cores, "core1", "./collection1");
@@ -205,7 +204,6 @@ public class TestCoreContainer extends S
   public void testClassLoaderHierarchy() throws Exception {
     final CoreContainer cc = init("_classLoaderHierarchy");
     try {
-      cc.setPersistent(false);
       ClassLoader sharedLoader = cc.loader.getClassLoader();
       ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
       assertSame(contextLoader, sharedLoader.getParent());

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java Tue Aug 13 06:33:29 2013
@@ -136,7 +136,7 @@ public class TestCoreDiscovery extends S
 
     CoreContainer cc = init();
     try {
-      assertEquals(CoreContainer.DEFAULT_DEFAULT_CORE_NAME,
+      assertEquals(ConfigSolrXmlOld.DEFAULT_DEFAULT_CORE_NAME,
                    cc.getDefaultCoreName());
 
       TestLazyCores.checkInCores(cc, "core1");

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestJmxIntegration.java Tue Aug 13 06:33:29 2013
@@ -23,9 +23,8 @@ import javax.management.*;
 import org.apache.lucene.util.Constants;
 import org.apache.solr.core.JmxMonitoredMap.SolrDynamicMBean;
 import org.apache.solr.util.AbstractSolrTestCase;
-import org.junit.After;
 import org.junit.Assume;
-import org.junit.Before;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -38,34 +37,47 @@ import org.junit.Test;
  */
 public class TestJmxIntegration extends AbstractSolrTestCase {
 
-  
+  private static MBeanServer mbeanServer = null;
+
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("solrconfig.xml", "schema.xml");
-  }
-
-  @Override
-  @Before
-  public void setUp() throws Exception {
     // Make sure that at least one MBeanServer is available
-    MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
-    super.setUp();
-  }
+    // prior to initializing the core
+    //
+    // (test configs are setup to use existing server if any, 
+    // otherwise skip JMX)
+    MBeanServer platformServer = ManagementFactory.getPlatformMBeanServer();
 
-  @Override
-  @After
-  public void tearDown() throws Exception {
-    super.tearDown();
+    initCore("solrconfig.xml", "schema.xml");
+
+    // we should be able to se that the core has JmxIntegration enabled
+    assertTrue("JMX not enabled",
+               h.getCore().getSolrConfig().jmxConfig.enabled);
+    // and we should be able to see that the the monitor map found 
+    // a JMX server to use, which refers to the server we started
+
+    Map registry = h.getCore().getInfoRegistry();
+    assertTrue("info registry is not a JMX monitored map",
+               registry instanceof JmxMonitoredMap);
+    mbeanServer = ((JmxMonitoredMap)registry).getServer();
+
+    assertNotNull("No JMX server found by monitor map",
+                  mbeanServer);
+
+    // NOTE: we can't garuntee that "mbeanServer == platformServer"
+    // the JVM may have mutiple MBean servers funning when the test started
+    // and the contract of not specifying one when configuring solr with
+    // <jmx /> is that it will use whatever the "first" MBean server 
+    // returned by the JVM is.
+  }
+
+  @AfterClass
+  public static void afterClass() throws Exception {
+    mbeanServer = null;
   }
 
   @Test
   public void testJmxRegistration() throws Exception {
-    List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
-    log.info("Servers in testJmxRegistration: " + servers);
-    assertNotNull("MBeanServers were null", servers);
-    assertFalse("No MBeanServer was found", servers.isEmpty());
-
-    MBeanServer mbeanServer = servers.get(0);
     assertTrue("No MBeans found in server", mbeanServer.getMBeanCount() > 0);
 
     Set<ObjectInstance> objects = mbeanServer.queryMBeans(null, null);
@@ -97,14 +109,6 @@ public class TestJmxIntegration extends 
   @Test
   public void testJmxUpdate() throws Exception {
 
-    // Workaround for SOLR-4418 (this test fails with "No
-    // mbean found for SolrIndexSearcher" on IBM J9 6.0 and 7.0):
-    Assume.assumeTrue(!"IBM Corporation".equals(Constants.JVM_VENDOR));
-
-    List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
-    log.info("Servers in testJmxUpdate: " + servers);
-    log.info(h.getCore().getInfoRegistry().toString());
-
     SolrInfoMBean bean = null;
     // wait until searcher is registered
     for (int i=0; i<100; i++) {
@@ -114,7 +118,7 @@ public class TestJmxIntegration extends 
     }
     if (bean==null) throw new RuntimeException("searcher was never registered");
     ObjectName searcher = getObjectName("searcher", bean);
-    MBeanServer mbeanServer = servers.get(0);
+
     log.info("Mbeans in server: " + mbeanServer.queryNames(null, null));
 
     assertFalse("No mbean found for SolrIndexSearcher", mbeanServer.queryMBeans(searcher, null).isEmpty());
@@ -129,8 +133,6 @@ public class TestJmxIntegration extends 
 
   @Test @Ignore("timing problem? https://issues.apache.org/jira/browse/SOLR-2715")
   public void testJmxOnCoreReload() throws Exception {
-    List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
-    MBeanServer mbeanServer = servers.get(0);
 
     String coreName = h.getCore().getName();
 

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java Tue Aug 13 06:33:29 2013
@@ -17,6 +17,8 @@ package org.apache.solr.core;
  * limitations under the License.
  */
 
+import org.apache.solr.update.SolrIndexConfigTest;
+
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.AtomicReaderContext;
@@ -25,6 +27,7 @@ import org.apache.lucene.index.SegmentIn
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.MergePolicy;
 import org.apache.lucene.index.TieredMergePolicy;
+import org.apache.lucene.index.ConcurrentMergeScheduler;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.util.RefCounted;
 import org.apache.solr.search.SolrIndexSearcher;
@@ -32,6 +35,7 @@ import org.apache.solr.SolrTestCaseJ4;
 import org.junit.After;
 import java.util.concurrent.atomic.AtomicInteger;
 
+/** @see SolrIndexConfigTest */
 public class TestMergePolicyConfig extends SolrTestCaseJ4 {
   
   private static AtomicInteger docIdCounter = new AtomicInteger(42);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java Tue Aug 13 06:33:29 2013
@@ -17,8 +17,14 @@ package org.apache.solr.core;
  * limitations under the License.
  */
 
+import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
+import org.apache.lucene.index.LiveIndexWriterConfig;
+
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.core.SolrCore;
+import org.apache.solr.util.RefCounted;
+import org.apache.solr.util.RandomMergePolicy;
 import org.apache.solr.update.LoggingInfoStream;
 import org.junit.BeforeClass;
 
@@ -28,11 +34,31 @@ public class TestSolrIndexConfig extends
   public static void beforeClass() throws Exception {
     initCore("solrconfig-indexconfig.xml","schema.xml");
   }
+
+  public void testLiveWriter() throws Exception {
+    SolrCore core = h.getCore();
+    RefCounted<IndexWriter> iw = core.getUpdateHandler().getSolrCoreState().getIndexWriter(core);
+    try {
+      checkIndexWriterConfig(iw.get().getConfig());
+    } finally {
+      if (null != iw) iw.decref();
+    }
+  }
+
   
-  public void testIndexConfig() throws Exception {
+  public void testIndexConfigParsing() throws Exception {
     IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema());
 
+    checkIndexWriterConfig(iwc);
+  }
+
+  private void checkIndexWriterConfig(LiveIndexWriterConfig iwc) {
+
     assertEquals(123, iwc.getMaxThreadStates());
     assertTrue(iwc.getInfoStream() instanceof LoggingInfoStream);
+    assertTrue(iwc.getMergePolicy().getClass().toString(),
+               iwc.getMergePolicy() instanceof RandomMergePolicy);
+
   }
+
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistence.java Tue Aug 13 06:33:29 2013
@@ -572,7 +572,7 @@ public class TestSolrXmlPersistence exte
   public static String SOLR_XML_LOTS_SYSVARS =
       "<solr persistent=\"${solr.xml.persist:false}\" coreLoadThreads=\"12\" sharedLib=\"${something:.}\" >\n" +
           "  <logging class=\"${logclass:log4j.class}\" enabled=\"{logenable:true}\">\n" +
-          "     <watcher size=\"{watchSize:13}\" threshold=\"${logThresh:54}\" />\n" +
+          "     <watcher size=\"${watchSize:13}\" threshold=\"${logThresh:54}\" />\n" +
           "  </logging>\n" +
           "  <cores adminPath=\"/admin/cores\" defaultCoreName=\"SystemVars1\" host=\"127.0.0.1\" \n" +
           "       hostPort=\"${hostPort:8983}\" hostContext=\"${hostContext:solr}\" \n" +

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java Tue Aug 13 06:33:29 2013
@@ -26,6 +26,9 @@ import org.apache.solr.util.AbstractSolr
 import org.junit.Assume;
 import org.junit.BeforeClass;
 
+/** 
+ * Test both XInclude as well as more old school "entity includes"
+ */
 public class TestXIncludeConfig extends AbstractSolrTestCase {
 
   @BeforeClass
@@ -62,7 +65,20 @@ public class TestXIncludeConfig extends 
                  chain.getFactories()[0].getClass());
 
     IndexSchema schema = core.getLatestSchema();
+    
+    // xinclude
     assertNotNull("ft-included is null", schema.getFieldTypeByName("ft-included"));
     assertNotNull("field-included is null", schema.getFieldOrNull("field-included"));
+
+    // entity include
+    assertNotNull("ft-entity-include1 is null", 
+                  schema.getFieldTypeByName("ft-entity-include1"));
+    assertNotNull("ft-entity-include2 is null", 
+                  schema.getFieldTypeByName("ft-entity-include2"));
+
+    // sanity check
+    assertNull("ft-entity-include3 is not null",  // Does Not Exist Anywhere
+               schema.getFieldTypeByName("ft-entity-include3"));
+
   }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestCSVLoader.java Tue Aug 13 06:33:29 2013
@@ -17,6 +17,7 @@
 
 package org.apache.solr.handler;
 
+import org.apache.lucene.util._TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.request.LocalSolrQueryRequest;
 import org.apache.solr.common.params.CommonParams;
@@ -39,9 +40,9 @@ public class TestCSVLoader extends SolrT
     initCore("solrconfig.xml","schema12.xml");
   }
 
-  String filename = "solr_tmp.csv";
+  String filename;
   String def_charset = "UTF-8";
-  File file = new File(filename);
+  File file;
 
   @Override
   @Before
@@ -49,6 +50,9 @@ public class TestCSVLoader extends SolrT
     // if you override setUp or tearDown, you better call
     // the super classes version
     super.setUp();
+    File tempDir = _TestUtil.getTempDir("TestCSVLoader");
+    file = new File(tempDir, "solr_tmp.csv");
+    filename = file.getPath();
     cleanup();
   }
   

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Tue Aug 13 06:33:29 2013
@@ -1572,6 +1572,8 @@ public class TestReplicationHandler exte
 
       copyConfigFile(getSolrConfigFile(), "solrconfig.xml");
       copyConfigFile(getSchemaFile(), "schema.xml");
+      copyConfigFile(CONF_DIR + "solrconfig.snippet.randomindexconfig.xml", 
+                     "solrconfig.snippet.randomindexconfig.xml");
     }
 
     public void tearDown() throws Exception {

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/handler/admin/LukeRequestHandlerTest.java Tue Aug 13 06:33:29 2013
@@ -184,6 +184,29 @@ public class LukeRequestHandlerTest exte
     }
   }
 
+  public void testNumTerms() throws Exception {
+    final String f = "name";
+    for (String n : new String[] {"2", "3", "100", "99999"}) {
+      assertQ(req("qt", "/admin/luke", "fl", f, "numTerms", n),
+              field(f) + "lst[@name='topTerms']/int[@name='Apache']",
+              field(f) + "lst[@name='topTerms']/int[@name='Solr']",
+              "count("+field(f)+"lst[@name='topTerms']/int)=2");
+    }
+    
+    assertQ(req("qt", "/admin/luke", "fl", f, "numTerms", "1"),
+            // no garuntee which one we find
+            "count("+field(f)+"lst[@name='topTerms']/int)=1");
+
+    assertQ(req("qt", "/admin/luke", "fl", f, "numTerms", "0"),
+            "count("+field(f)+"lst[@name='topTerms']/int)=0");
+
+    // field with no terms shouldn't error
+    for (String n : new String[] {"0", "1", "2", "100", "99999"}) {
+      assertQ(req("qt", "/admin/luke", "fl", "bogus_s", "numTerms", n),
+              "count("+field(f)+"lst[@name='topTerms']/int)=0");
+    }
+  }
+
   public void testCopyFieldLists() throws Exception {
     SolrQueryRequest req = req("qt", "/admin/luke", "show", "schema");
 

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/logging/TestLogWatcher.java Tue Aug 13 06:33:29 2013
@@ -19,7 +19,6 @@ package org.apache.solr.logging;
 
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
-import org.apache.solr.core.ConfigSolr;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -27,24 +26,16 @@ import org.slf4j.LoggerFactory;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 public class TestLogWatcher {
 
-  private ConfigSolr config;
+  private LogWatcherConfig config;
 
   @Before
   public void setUp() {
-    config = createMock(ConfigSolr.class);
-    expect(config.getBool(ConfigSolr.CfgProp.SOLR_LOGGING_ENABLED, true)).andReturn(true);
-    expect(config.getInt(ConfigSolr.CfgProp.SOLR_LOGGING_WATCHER_SIZE, 50)).andReturn(50);
-    expect(config.get(ConfigSolr.CfgProp.SOLR_LOGGING_WATCHER_THRESHOLD, null)).andReturn(null);
-    expect(config.get(ConfigSolr.CfgProp.SOLR_LOGGING_CLASS, null)).andReturn(null);
-    replay(config);
+    config = new LogWatcherConfig(true, null, null, 50);
   }
 
   @Test

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/TestFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/TestFaceting.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/TestFaceting.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/request/TestFaceting.java Tue Aug 13 06:33:29 2013
@@ -112,7 +112,7 @@ public class TestFaceting extends SolrTe
 
     // test seeking before term
     if (size>0) {
-      assertEquals(size>0, te.seekCeil(new BytesRef("000"), true) != TermsEnum.SeekStatus.END);
+      assertEquals(size>0, te.seekCeil(new BytesRef("000")) != TermsEnum.SeekStatus.END);
       assertEquals(0, te.ord());
       assertEquals(t(0), te.term().utf8ToString());
     }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/NumericFieldsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/NumericFieldsTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/NumericFieldsTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/NumericFieldsTest.java Tue Aug 13 06:33:29 2013
@@ -26,7 +26,7 @@ import org.junit.Test;
 public class NumericFieldsTest extends SolrTestCaseJ4 {
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore("solrconfig-master.xml", "schema-numeric.xml");
+    initCore("solrconfig-basic.xml", "schema-numeric.xml");
   }
 
   static String[] types = new String[]{"int", "long", "float", "double", "date"};

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestBinaryField.java Tue Aug 13 06:33:29 2013
@@ -22,71 +22,47 @@ import java.nio.ByteBuffer;
 import java.util.List;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.commons.io.FileUtils;
+
+import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.beans.Field;
-import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.*;
 import org.apache.solr.core.SolrResourceLoader;
-import org.junit.Rule;
-import org.junit.rules.RuleChain;
-import org.junit.rules.TestRule;
-
-import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
-
-public class TestBinaryField extends LuceneTestCase {
-  HttpSolrServer server;
-  JettySolrRunner jetty;
-
-  int port = 0;
-  static final String context = "/example";
-
-  @Rule
-  public TestRule solrTestRules = 
-    RuleChain.outerRule(new SystemPropertiesRestoreRule());
+import org.apache.solr.SolrJettyTestBase;
+import org.junit.BeforeClass;
 
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
+public class TestBinaryField extends SolrJettyTestBase {
 
-    File home = new File(TEMP_DIR,
-        "solrtest-TestBinaryField-" + System.currentTimeMillis());
-
-    File homeDir = new File(home, "example");
-    File dataDir = new File(homeDir + "/collection1", "data");
-    File confDir = new File(homeDir + "/collection1", "conf");
+  @BeforeClass
+  public static void beforeTest() throws Exception {
+    File homeDir = new File(TEMP_DIR,
+                            "solrtest-TestBinaryField-" + System.currentTimeMillis());
+    File collDir = new File(homeDir, "collection1");
+    File dataDir = new File(collDir, "data");
+    File confDir = new File(collDir, "conf");
 
     homeDir.mkdirs();
+    collDir.mkdirs();
     dataDir.mkdirs();
     confDir.mkdirs();
 
-    SolrResourceLoader loader = new SolrResourceLoader("solr/collection1");
-    File f = new File(confDir, "solrconfig.xml");
-    String fname = "solr/collection1/conf/solrconfig-slave1.xml";
-    FileOutputStream out = new FileOutputStream(f);
-    IOUtils.copy(loader.openResource(fname), out);
-    out.close();
-    f = new File(confDir, "schema.xml");
-    fname = "solr/collection1/conf/schema-binaryfield.xml";
-    out = new FileOutputStream(f);
-    IOUtils.copy(loader.openResource(fname), out);
-    out.close();
-    System.setProperty("solr.data.dir", dataDir.getAbsolutePath());
-    System.setProperty("solr.test.sys.prop1", "propone");
-    System.setProperty("solr.test.sys.prop2", "proptwo");
-    System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
-
-    jetty = new JettySolrRunner(homeDir.getAbsolutePath(), context, 0);
-    jetty.start();
-    port = jetty.getLocalPort();
+    String src_dir = TEST_HOME() + "/collection1/conf";
+    FileUtils.copyFile(new File(src_dir, "schema-binaryfield.xml"), 
+                       new File(confDir, "schema.xml"));
+    FileUtils.copyFile(new File(src_dir, "solrconfig-basic.xml"), 
+                       new File(confDir, "solrconfig.xml"));
+    FileUtils.copyFile(new File(src_dir, "solrconfig.snippet.randomindexconfig.xml"), 
+                       new File(confDir, "solrconfig.snippet.randomindexconfig.xml"));
 
-    String url = "http://127.0.0.1:" + jetty.getLocalPort() + context;
-    server = new HttpSolrServer(url);
+    createJetty(homeDir.getAbsolutePath(), null, null);
   }
 
+
   public void testSimple() throws Exception {
+    SolrServer server = getSolrServer();
     byte[] buf = new byte[10];
     for (int i = 0; i < 10; i++) {
       buf[i] = (byte) i;
@@ -179,11 +155,4 @@ public class TestBinaryField extends Luc
     byte [] data;
   }
 
-
-  @Override
-  public void tearDown() throws Exception {
-    jetty.stop();
-    System.clearProperty("tests.shardhandler.randomSeed");
-    super.tearDown();
-  }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java Tue Aug 13 06:33:29 2013
@@ -16,13 +16,6 @@ package org.apache.solr.schema;
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Pattern;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.solr.common.SolrException;
@@ -36,6 +29,13 @@ import org.apache.solr.response.SolrQuer
 import org.junit.After;
 import org.junit.Before;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Pattern;
+
 public class TestManagedSchema extends AbstractBadConfigTestBase {
 
   private static File tmpSolrHome;
@@ -122,7 +122,6 @@ public class TestManagedSchema extends A
   
   private void assertSchemaResource(String collection, String expectedSchemaResource) throws Exception {
     final CoreContainer cores = h.getCoreContainer();
-    cores.setPersistent(false);
     final CoreAdminHandler admin = new CoreAdminHandler(cores);
     SolrQueryRequest request = req(CoreAdminParams.ACTION, CoreAdminParams.CoreAdminAction.STATUS.toString());
     SolrQueryResponse response = new SolrQueryResponse();
@@ -422,4 +421,24 @@ public class TestManagedSchema extends A
     assertNotNull(newNewSchema.getUniqueKeyField());
     assertEquals("str", newNewSchema.getUniqueKeyField().getName());
   }
+
+  public void testAddFieldThenReload() throws Exception {
+    deleteCore();
+    File managedSchemaFile = new File(tmpConfDir, "managed-schema");
+    assertTrue(managedSchemaFile.delete()); // Delete managed-schema so it won't block parsing a new schema
+    initCore("solrconfig-mutable-managed-schema.xml", "schema-one-field-no-dynamic-field.xml", tmpSolrHome.getPath());
+
+    String fieldName = "new_text_field";
+    assertNull("Field '" + fieldName + "' is present in the schema",
+        h.getCore().getLatestSchema().getFieldOrNull(fieldName));
+
+    Map<String,Object> options = new HashMap<String,Object>();
+    IndexSchema oldSchema = h.getCore().getLatestSchema();
+    String fieldType = "text";
+    SchemaField newField = oldSchema.newField(fieldName, fieldType, options);
+    IndexSchema newSchema = oldSchema.addField(newField);
+    h.getCore().setLatestSchema(newSchema);
+
+    h.reload();
+  }
 }

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java Tue Aug 13 06:33:29 2013
@@ -298,6 +298,13 @@ public class QueryEqualityTest extends S
     }
   }
 
+  public void testBlockJoin() throws Exception {
+    assertQueryEquals("parent", "{!parent which=foo_s:parent}dude",
+        "{!parent which=foo_s:parent}dude");
+    assertQueryEquals("child", "{!child of=foo_s:parent}dude",
+        "{!child of=foo_s:parent}dude");
+  }
+
   public void testQuerySurround() throws Exception {
     assertQueryEquals("surround", "{!surround}and(apache,solr)", 
                       "and(apache,solr)", "apache AND solr");

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java Tue Aug 13 06:33:29 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.search;
 
+import org.apache.lucene.index.LogDocMergePolicy;
 import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReaderContext;
 import org.apache.lucene.index.ReaderUtil;
@@ -34,6 +35,11 @@ public class TestIndexSearcher extends S
 
   @BeforeClass
   public static void beforeClass() throws Exception {
+
+    // we need a consistent segmentation because reopen test validation
+    // dependso n merges not happening when it doesn't expect
+    System.setProperty("solr.tests.mergePolicy", LogDocMergePolicy.class.getName());
+
     initCore("solrconfig.xml","schema.xml");
   }
   

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRTGBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRTGBase.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRTGBase.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/TestRTGBase.java Tue Aug 13 06:33:29 2013
@@ -132,7 +132,7 @@ public class TestRTGBase extends SolrTes
     if (terms == null) return -1;
     BytesRef termBytes = t.bytes();
     final TermsEnum termsEnum = terms.iterator(null);
-    if (!termsEnum.seekExact(termBytes, false)) {
+    if (!termsEnum.seekExact(termBytes)) {
       return -1;
     }
     DocsEnum docs = termsEnum.docs(MultiFields.getLiveDocs(r), null, DocsEnum.FLAG_NONE);

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java Tue Aug 13 06:33:29 2013
@@ -76,7 +76,7 @@ public class DistanceFunctionTest extend
 
   @Test
   public void testLatLon() throws Exception {
-    assertU(adoc("id", "100", "store", "1,2"));
+    assertU(adoc("id", "100", "store", "1,2"));//copied to store_rpt
     assertU(commit());
    
     assertJQ(req("defType","func", 
@@ -126,6 +126,16 @@ public class DistanceFunctionTest extend
              , 1e-5
              ,"/response/docs/[0]/score==314.40338"
              );
+
+    // if pt missing, use sfield (RPT)
+    assertJQ(req("defType","func",
+        "q","geodist(3,4)",
+        "sfield","store_rpt",
+        "fq","id:100",
+        "fl","id,score")
+        , 1e-5
+        ,"/response/docs/[0]/score==314.40338"
+    );
     
     // read both pt and sfield
     assertJQ(req("defType","func", 
@@ -137,6 +147,16 @@ public class DistanceFunctionTest extend
              ,"/response/docs/[0]/score==314.40338"
              );
 
+    // read both pt and sfield (RPT)
+    assertJQ(req("defType","func",
+        "q","geodist()","pt","3,4",
+        "sfield","store_rpt",
+        "fq","id:100",
+        "fl","id,score")
+        , 1e-5
+        ,"/response/docs/[0]/score==314.40338"
+    );
+
     // param substitution
     assertJQ(req("defType","func", 
                  "q","geodist($a,$b)",

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java Tue Aug 13 06:33:29 2013
@@ -44,6 +44,10 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.servlet.SolrRequestParsers.MultipartRequestParser;
+import org.apache.solr.servlet.SolrRequestParsers.FormDataRequestParser;
+import org.apache.solr.servlet.SolrRequestParsers.RawRequestParser;
+import org.apache.solr.servlet.SolrRequestParsers.StandardRequestParser;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -239,6 +243,38 @@ public class SolrRequestParserTest exten
   }
   
   @Test
+  public void testStandardParseParamsAndFillStreamsISO88591() throws Exception
+  {
+    final String getParams = "qt=%FC&dup=foo&ie=iso-8859-1&dup=%FC", postParams = "qt2=%FC&q=hello&d%75p=bar";
+    final byte[] postBytes = postParams.getBytes("US-ASCII");
+    final String contentType = "application/x-www-form-urlencoded; charset=iso-8859-1";
+    
+    // Set up the expected behavior
+    HttpServletRequest request = createMock(HttpServletRequest.class);
+    expect(request.getMethod()).andReturn("POST").anyTimes();
+    expect(request.getContentType()).andReturn( contentType ).anyTimes();
+    expect(request.getQueryString()).andReturn(getParams).anyTimes();
+    expect(request.getContentLength()).andReturn(postBytes.length).anyTimes();
+    expect(request.getInputStream()).andReturn(new ServletInputStream() {
+      private final ByteArrayInputStream in = new ByteArrayInputStream(postBytes);
+      @Override public int read() { return in.read(); }
+    });
+    replay(request);
+    
+    MultipartRequestParser multipart = new MultipartRequestParser( 2048 );
+    RawRequestParser raw = new RawRequestParser();
+    FormDataRequestParser formdata = new FormDataRequestParser( 2048 );
+    StandardRequestParser standard = new StandardRequestParser( multipart, raw, formdata );
+    
+    SolrParams p = standard.parseParamsAndFillStreams(request, new ArrayList<ContentStream>());
+    
+    assertEquals( "contentType: "+contentType, "hello", p.get("q") );
+    assertEquals( "contentType: "+contentType, "\u00FC", p.get("qt") );
+    assertEquals( "contentType: "+contentType, "\u00FC", p.get("qt2") );
+    assertArrayEquals( "contentType: "+contentType, new String[]{"foo","\u00FC","bar"}, p.getParams("dup") );
+  }
+  
+  @Test
   public void testStandardFormdataUploadLimit() throws Exception
   {
     final int limitKBytes = 128;

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java Tue Aug 13 06:33:29 2013
@@ -36,6 +36,7 @@ import org.apache.solr.request.SolrQuery
 import org.apache.solr.request.SolrRequestHandler;
 import org.apache.solr.response.SolrQueryResponse;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 @Slow
@@ -433,7 +434,9 @@ public class SpellCheckCollatorTest exte
       );
     }
   }
+
   @Test
+  @Ignore("SOLR-5122: estimates don't seem to make any sense")
   public void testEstimatedHitCounts() throws Exception {
    assertQ(
         req(

Modified: lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java?rev=1513364&r1=1513363&r2=1513364&view=diff
==============================================================================
--- lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java (original)
+++ lucene/dev/branches/lucene3069/solr/core/src/test/org/apache/solr/spelling/WordBreakSolrSpellCheckerTest.java Tue Aug 13 06:33:29 2013
@@ -44,6 +44,7 @@ public class WordBreakSolrSpellCheckerTe
     assertNull(h.validateUpdate(adoc("id", "4", "lowerfilt", "printable in pointable paint able")));
     assertNull(h.validateUpdate(adoc("id", "5", "lowerfilt", "printable in puntable paint able ")));
     assertNull(h.validateUpdate(adoc("id", "6", "lowerfilt", "paint able in pintable plantable")));
+    assertNull(h.validateUpdate(adoc("id", "7", "lowerfilt", "zxcvqwtp fg hj")));
     assertNull(h.validateUpdate(commit()));    
     //docfreq=7:  in
     //docfreq=5:  able
@@ -277,6 +278,21 @@ public class WordBreakSolrSpellCheckerTe
         SpellCheckComponent.SPELLCHECK_COLLATE_EXTENDED_RESULTS, "true",
         SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "1"),
         "//lst[@name='collation'][1 ]/str[@name='collationQuery']='lowerfilt:((+printable +in +puntable +plantable))'"
-    );    
+    );
+    assertQ(req(
+        "q", "zxcv AND qwtp AND fghj", 
+        "qt", "spellCheckWithWordbreak",
+        "defType", "edismax",
+        "qf", "lowerfilt",
+        "indent", "true",
+        SpellCheckComponent.SPELLCHECK_BUILD, "true",
+        SpellCheckComponent.COMPONENT_NAME, "true", 
+        SpellCheckComponent.SPELLCHECK_ACCURACY, ".75", 
+        SpellCheckComponent.SPELLCHECK_EXTENDED_RESULTS, "true",
+        SpellCheckComponent.SPELLCHECK_COLLATE, "true",
+        SpellCheckComponent.SPELLCHECK_COLLATE_EXTENDED_RESULTS, "true",
+        SpellCheckComponent.SPELLCHECK_MAX_COLLATIONS, "10"),
+        "//lst[@name='collation'][1 ]/str[@name='collationQuery']='zxcvqwtp AND (fg AND hj)'"
+    ); 
   }
 }



Mime
View raw message