You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/07/25 18:32:08 UTC

svn commit: r1507054 - in /lucene/dev/branches/lucene5127/solr/core/src: java/org/apache/solr/core/IndexReaderFactory.java test-files/solr/collection1/conf/solrconfig-termindex.xml test/org/apache/solr/core/IndexReaderFactoryTest.java

Author: rmuir
Date: Thu Jul 25 16:32:08 2013
New Revision: 1507054

URL: http://svn.apache.org/r1507054
Log:
LUCENE-5127: fix solr tests

Modified:
    lucene/dev/branches/lucene5127/solr/core/src/java/org/apache/solr/core/IndexReaderFactory.java
    lucene/dev/branches/lucene5127/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
    lucene/dev/branches/lucene5127/solr/core/src/test/org/apache/solr/core/IndexReaderFactoryTest.java

Modified: lucene/dev/branches/lucene5127/solr/core/src/java/org/apache/solr/core/IndexReaderFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5127/solr/core/src/java/org/apache/solr/core/IndexReaderFactory.java?rev=1507054&r1=1507053&r2=1507054&view=diff
==============================================================================
--- lucene/dev/branches/lucene5127/solr/core/src/java/org/apache/solr/core/IndexReaderFactory.java (original)
+++ lucene/dev/branches/lucene5127/solr/core/src/java/org/apache/solr/core/IndexReaderFactory.java Thu Jul 25 16:32:08 2013
@@ -27,12 +27,8 @@ import org.apache.solr.util.plugin.Named
  * Factory used to build a new IndexReader instance.
  */
 public abstract class IndexReaderFactory implements NamedListInitializedPlugin {
-  protected int termInfosIndexDivisor = 1;//IndexReader.DEFAULT_TERMS_INDEX_DIVISOR;  Set this once Lucene makes this public.
   /**
-   * Potentially initializes {@link #termInfosIndexDivisor}.  Overriding classes should call super.init() in order
-   * to make sure termInfosIndexDivisor is set.
-   * <p>
-   * <code>init</code> will be called just once, immediately after creation.
+   * init will be called just once, immediately after creation.
    * <p>
    * The args are user-level initialization parameters that may be specified
    * when declaring an indexReaderFactory in solrconfig.xml
@@ -40,21 +36,13 @@ public abstract class IndexReaderFactory
    */
   @Override
   public void init(NamedList args) {
-    Integer v = (Integer)args.get("setTermIndexDivisor");
+   Object v = args.get("setTermIndexDivisor");
     if (v != null) {
-      termInfosIndexDivisor = v.intValue();
+      throw new IllegalArgumentException("Illegal parameter 'setTermIndexDivisor'");
     }
   }
 
   /**
-   *
-   * @return The setting of {@link #termInfosIndexDivisor} 
-   */
-  public int getTermInfosIndexDivisor() {
-    return termInfosIndexDivisor;
-  }
-
-  /**
    * Creates a new IndexReader instance using the given Directory.
    * 
    * @param indexDir indexDir index location

Modified: lucene/dev/branches/lucene5127/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5127/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml?rev=1507054&r1=1507053&r2=1507054&view=diff
==============================================================================
--- lucene/dev/branches/lucene5127/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml (original)
+++ lucene/dev/branches/lucene5127/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml Thu Jul 25 16:32:08 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/lucene5127/solr/core/src/test/org/apache/solr/core/IndexReaderFactoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5127/solr/core/src/test/org/apache/solr/core/IndexReaderFactoryTest.java?rev=1507054&r1=1507053&r2=1507054&view=diff
==============================================================================
--- lucene/dev/branches/lucene5127/solr/core/src/test/org/apache/solr/core/IndexReaderFactoryTest.java (original)
+++ lucene/dev/branches/lucene5127/solr/core/src/test/org/apache/solr/core/IndexReaderFactoryTest.java Thu Jul 25 16:32:08 2013
@@ -33,8 +33,5 @@ public class IndexReaderFactoryTest exte
     IndexReaderFactory readerFactory = h.getCore().getIndexReaderFactory();
     assertNotNull("Factory is null", readerFactory);
     assertTrue("readerFactory is not an instanceof " + AlternateDirectoryTest.TestIndexReaderFactory.class, readerFactory instanceof StandardIndexReaderFactory);
-    assertTrue("termInfoIndexDivisor not set to 12", readerFactory.getTermInfosIndexDivisor() == 12);
-
-
   }
 }
\ No newline at end of file