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

svn commit: r1438199 [1/2] - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/facet/ lucene/facet/src/examples/org/apache/lucene/facet/example/merge/ lucene/facet/src/java/org/apache/lucene/facet/index/params/ lucene/facet/src/java/org/apache/lucen...

Author: shaie
Date: Thu Jan 24 21:19:52 2013
New Revision: 1438199

URL: http://svn.apache.org/viewvc?rev=1438199&view=rev
Log:
LUCENE-4691: Facet tests should randomly pick IntEncoder and other stuff

Added:
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java
      - copied, changed from r1438188, lucene/dev/trunk/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java
Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/facet/   (props changed)
    lucene/dev/branches/branch_4x/lucene/facet/src/examples/org/apache/lucene/facet/example/merge/TaxonomyMergeUtils.java
    lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/index/params/CategoryListParams.java
    lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/util/encoding/FourFlagsIntDecoder.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestBase.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestUtils.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/OrdinalMappingReaderTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/TestFacetsPayloadMigrationReader.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/FacetIndexingParamsTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/PerDimensionIndexingParamsTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CategoryListIteratorTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/DrillDownTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestDemoFacets.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetArrays.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsAccumulatorWithComplement.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsCollector.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestScoredDocIdCollector.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestStandardFacetsAccumulator.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTopKInEachNodeResultHandler.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCounts.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCountsCache.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/associations/AssociationsFacetRequestTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetSearchParamsTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/MultiCategoryListIteratorTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/sampling/OversampleWithDepthTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestCategoryPath.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyCombined.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestConcurrentFacetedIndexing.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyWriter.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCharBlockArray.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCompactLabelToOrdinal.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/util/TestScoredDocIDsUtils.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayInputStreamTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayOutputStreamTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ArrayHashMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/FloatToObjectMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntArrayTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntHashSetTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntToDoubleMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntToFloatMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntToIntMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/IntToObjectMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ObjectToFloatMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ObjectToIntMapTest.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/TestLRUHashMap.java
    lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/encoding/EncodingTest.java

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/examples/org/apache/lucene/facet/example/merge/TaxonomyMergeUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/examples/org/apache/lucene/facet/example/merge/TaxonomyMergeUtils.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/examples/org/apache/lucene/facet/example/merge/TaxonomyMergeUtils.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/examples/org/apache/lucene/facet/example/merge/TaxonomyMergeUtils.java Thu Jan 24 21:19:52 2013
@@ -45,17 +45,17 @@ public class TaxonomyMergeUtils {
    * opens {@link DirectoryTaxonomyWriter} and {@link IndexWriter} on the
    * respective destination indexes. Therefore if you have a writer open on any
    * of them, it should be closed, or you should use
-   * {@link #merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter)}
+   * {@link #merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter, FacetIndexingParams)}
    * instead.
    * 
-   * @see #merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter)
+   * @see #merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter, FacetIndexingParams)
    */
-  public static void merge(Directory srcIndexDir, Directory srcTaxDir,
-                            Directory destIndexDir, Directory destTaxDir) throws IOException {
+  public static void merge(Directory srcIndexDir, Directory srcTaxDir, Directory destIndexDir, Directory destTaxDir, 
+      FacetIndexingParams params) throws IOException {
     IndexWriter destIndexWriter = new IndexWriter(destIndexDir,
         new IndexWriterConfig(ExampleUtils.EXAMPLE_VER, null));
     DirectoryTaxonomyWriter destTaxWriter = new DirectoryTaxonomyWriter(destTaxDir);
-    merge(srcIndexDir, srcTaxDir, new MemoryOrdinalMap(), destIndexWriter, destTaxWriter);
+    merge(srcIndexDir, srcTaxDir, new MemoryOrdinalMap(), destIndexWriter, destTaxWriter, params);
     destTaxWriter.close();
     destIndexWriter.close();
   }
@@ -64,30 +64,26 @@ public class TaxonomyMergeUtils {
    * Merges the given taxonomy and index directories and commits the changes to
    * the given writers. This method uses {@link MemoryOrdinalMap} to store the
    * mapped ordinals. If you cannot afford the memory, you can use
-   * {@link #merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap, IndexWriter, DirectoryTaxonomyWriter)}
+   * {@link #merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap, IndexWriter, DirectoryTaxonomyWriter, FacetIndexingParams)}
    * by passing {@link DiskOrdinalMap}.
    * 
-   * @see #merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap, IndexWriter, DirectoryTaxonomyWriter)
+   * @see #merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap,
+   *      IndexWriter, DirectoryTaxonomyWriter, FacetIndexingParams)
    */
-  public static void merge(Directory srcIndexDir, Directory srcTaxDir,
-                            IndexWriter destIndexWriter, 
-                            DirectoryTaxonomyWriter destTaxWriter) throws IOException {
-    merge(srcIndexDir, srcTaxDir, new MemoryOrdinalMap(), destIndexWriter, destTaxWriter);
+  public static void merge(Directory srcIndexDir, Directory srcTaxDir, IndexWriter destIndexWriter, 
+      DirectoryTaxonomyWriter destTaxWriter, FacetIndexingParams params) throws IOException {
+    merge(srcIndexDir, srcTaxDir, new MemoryOrdinalMap(), destIndexWriter, destTaxWriter, params);
   }
   
   /**
    * Merges the given taxonomy and index directories and commits the changes to
    * the given writers.
    */
-  public static void merge(Directory srcIndexDir, Directory srcTaxDir,
-                            OrdinalMap map, IndexWriter destIndexWriter,
-                            DirectoryTaxonomyWriter destTaxWriter) throws IOException {
+  public static void merge(Directory srcIndexDir, Directory srcTaxDir, OrdinalMap map, IndexWriter destIndexWriter, 
+      DirectoryTaxonomyWriter destTaxWriter, FacetIndexingParams params) throws IOException {
     // merge the taxonomies
     destTaxWriter.addTaxonomy(srcTaxDir, map);
-
     int ordinalMap[] = map.getMap();
-    FacetIndexingParams params = FacetIndexingParams.ALL_PARENTS;
-
     DirectoryReader reader = DirectoryReader.open(srcIndexDir, -1);
     List<AtomicReaderContext> leaves = reader.leaves();
     int numReaders = leaves.size();

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/index/params/CategoryListParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/index/params/CategoryListParams.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/index/params/CategoryListParams.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/facet/index/params/CategoryListParams.java Thu Jan 24 21:19:52 2013
@@ -143,4 +143,9 @@ public class CategoryListParams implemen
     return DEFAULT_ORDINAL_POLICY;
   }
   
+  @Override
+  public String toString() {
+    return "field=" + field + " encoder=" + createEncoder() + " ordinalPolicy=" + getOrdinalPolicy();
+  }
+  
 }
\ No newline at end of file

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/util/encoding/FourFlagsIntDecoder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/util/encoding/FourFlagsIntDecoder.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/util/encoding/FourFlagsIntDecoder.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/java/org/apache/lucene/util/encoding/FourFlagsIntDecoder.java Thu Jan 24 21:19:52 2013
@@ -86,7 +86,7 @@ public class FourFlagsIntDecoder extends
 
   @Override
   public String toString() {
-    return "FourFlags(VInt8)";
+    return "FourFlags(VInt)";
   }
 
 }

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestBase.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestBase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestBase.java Thu Jan 24 21:19:52 2013
@@ -42,10 +42,8 @@ import org.apache.lucene.search.IndexSea
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -66,8 +64,8 @@ import org.junit.BeforeClass;
  * limitations under the License.
  */
 
-@SuppressCodecs({"SimpleText", "Lucene3x"})
-public abstract class FacetTestBase extends LuceneTestCase {
+@SuppressCodecs({"SimpleText","Lucene3x"})
+public abstract class FacetTestBase extends FacetTestCase {
   
   /** Holds a search and taxonomy Directories pair. */
   private static final class SearchTaxoDirPair {
@@ -93,7 +91,7 @@ public abstract class FacetTestBase exte
   @BeforeClass
   public static void beforeClassFacetTestBase() {
     TEST_DIR = _TestUtil.getTempDir("facets");
-    dirsPerPartitionSize = new HashMap<Integer, FacetTestBase.SearchTaxoDirPair>(); 
+    dirsPerPartitionSize = new HashMap<Integer, FacetTestBase.SearchTaxoDirPair>();
   }
   
   @AfterClass
@@ -182,8 +180,10 @@ public abstract class FacetTestBase exte
     return newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer);
   }
 
-  /** Returns a default facet indexing params */
+  /** Returns a {@link FacetIndexingParams} per the given partition size. */
   protected FacetIndexingParams getFacetIndexingParams(final int partSize) {
+    // several of our encoders don't support the value 0, 
+    // which is one of the values encoded when dealing w/ partitions.
     return new FacetIndexingParams() {
       @Override
       public int getPartitionSize() {

Copied: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java (from r1438188, lucene/dev/trunk/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java?p2=lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java&p1=lucene/dev/trunk/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java&r1=1438188&r2=1438199&rev=1438199&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestCase.java Thu Jan 24 21:19:52 2013
@@ -4,6 +4,7 @@ import java.util.Random;
 
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.encoding.DGapIntEncoder;
 import org.apache.lucene.util.encoding.DGapVInt8IntEncoder;
 import org.apache.lucene.util.encoding.EightFlagsIntEncoder;
@@ -31,6 +32,7 @@ import org.apache.lucene.util.encoding.V
  * limitations under the License.
  */
 
+@SuppressCodecs("Lucene3x")
 public class FacetTestCase extends LuceneTestCase {
   
   private static final IntEncoder[] ENCODERS = new IntEncoder[] {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestUtils.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestUtils.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/FacetTestUtils.java Thu Jan 24 21:19:52 2013
@@ -1,30 +1,17 @@
 package org.apache.lucene.facet;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.facet.index.params.FacetIndexingParams;
-import org.apache.lucene.facet.search.FacetsCollector;
-import org.apache.lucene.facet.search.params.CountFacetRequest;
-import org.apache.lucene.facet.search.params.FacetRequest;
-import org.apache.lucene.facet.search.params.FacetSearchParams;
 import org.apache.lucene.facet.search.results.FacetResult;
 import org.apache.lucene.facet.search.results.FacetResultNode;
-import org.apache.lucene.facet.taxonomy.CategoryPath;
-import org.apache.lucene.facet.taxonomy.TaxonomyReader;
 import org.apache.lucene.facet.taxonomy.TaxonomyWriter;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.search.Collector;
 import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.search.MultiCollector;
-import org.apache.lucene.search.TopScoreDocCollector;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 
@@ -109,30 +96,6 @@ public class FacetTestUtils {
     return pairs;
   }
 
-  public static Collector[] search(IndexSearcher searcher, TaxonomyReader taxonomyReader, FacetIndexingParams iParams, 
-      int k, String... facetNames) throws IOException {
-    
-    Collector[] collectors = new Collector[2];
-    
-    List<FacetRequest> fRequests = new ArrayList<FacetRequest>();
-    for (String facetName : facetNames) {
-      CategoryPath cp = new CategoryPath(facetName);
-      FacetRequest fq = new CountFacetRequest(cp, k);
-      fRequests.add(fq);
-    }
-    FacetSearchParams facetSearchParams = new FacetSearchParams(fRequests, iParams);
-
-    TopScoreDocCollector topDocsCollector = TopScoreDocCollector.create(searcher.getIndexReader().maxDoc(), true);
-    FacetsCollector facetsCollector = FacetsCollector.create(facetSearchParams, searcher.getIndexReader(), taxonomyReader);
-    Collector mColl = MultiCollector.wrap(topDocsCollector, facetsCollector);
-    
-    collectors[0] = topDocsCollector;
-    collectors[1] = facetsCollector;
-
-    searcher.search(new MatchAllDocsQuery(), mColl);
-    return collectors;
-  }
-
   public static String toSimpleString(FacetResult fr) {
     StringBuilder sb = new StringBuilder();
     toSimpleString(0, sb, fr.getFacetResultNode(), "");

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/OrdinalMappingReaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/OrdinalMappingReaderTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/OrdinalMappingReaderTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/OrdinalMappingReaderTest.java Thu Jan 24 21:19:52 2013
@@ -7,17 +7,9 @@ import java.util.List;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.index.DirectoryReader;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.index.RandomIndexWriter;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.MatchAllDocsQuery;
-import org.apache.lucene.store.Directory;
-import org.junit.Test;
-
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.example.merge.TaxonomyMergeUtils;
+import org.apache.lucene.facet.index.params.FacetIndexingParams;
 import org.apache.lucene.facet.search.FacetsCollector;
 import org.apache.lucene.facet.search.params.CountFacetRequest;
 import org.apache.lucene.facet.search.params.FacetSearchParams;
@@ -26,6 +18,13 @@ import org.apache.lucene.facet.search.re
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter;
+import org.apache.lucene.index.DirectoryReader;
+import org.apache.lucene.index.IndexWriterConfig;
+import org.apache.lucene.index.RandomIndexWriter;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.MatchAllDocsQuery;
+import org.apache.lucene.store.Directory;
+import org.junit.Test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -44,35 +43,35 @@ import org.apache.lucene.facet.taxonomy.
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class OrdinalMappingReaderTest extends LuceneTestCase {
+public class OrdinalMappingReaderTest extends FacetTestCase {
   
   private static final int NUM_DOCS = 100;
   
   @Test
   public void testTaxonomyMergeUtils() throws Exception {
     Directory dir = newDirectory();
-    Directory taxDir = newDirectory();    
-    buildIndexWithFacets(dir, taxDir, true);
+    Directory taxDir = newDirectory();
+    FacetIndexingParams fip = new FacetIndexingParams(randomCategoryListParams());
+    buildIndexWithFacets(dir, taxDir, true, fip);
     
     Directory dir1 = newDirectory();
     Directory taxDir1 = newDirectory();
-    buildIndexWithFacets(dir1, taxDir1, false);
+    buildIndexWithFacets(dir1, taxDir1, false, fip);
     
-    TaxonomyMergeUtils.merge(dir, taxDir, dir1, taxDir1);
+    TaxonomyMergeUtils.merge(dir, taxDir, dir1, taxDir1, fip);
     
-    verifyResults(dir1, taxDir1);
+    verifyResults(dir1, taxDir1, fip);
     dir1.close();
     taxDir1.close();
     dir.close();
     taxDir.close();
   }
 
-  private void verifyResults(Directory dir, Directory taxDir) throws IOException {
+  private void verifyResults(Directory dir, Directory taxDir, FacetIndexingParams fip) throws IOException {
     DirectoryReader reader1 = DirectoryReader.open(dir);
     DirectoryTaxonomyReader taxReader = new DirectoryTaxonomyReader(taxDir);
     IndexSearcher searcher = newSearcher(reader1);
-    FacetSearchParams fsp = new FacetSearchParams(new CountFacetRequest(new CategoryPath("tag"), NUM_DOCS));
+    FacetSearchParams fsp = new FacetSearchParams(fip, new CountFacetRequest(new CategoryPath("tag"), NUM_DOCS));
     FacetsCollector collector = FacetsCollector.create(fsp, reader1, taxReader);
     searcher.search(new MatchAllDocsQuery(), collector);
     FacetResult result = collector.getFacetResults().get(0);
@@ -90,7 +89,7 @@ public class OrdinalMappingReaderTest ex
     taxReader.close();
   }
 
-  private void buildIndexWithFacets(Directory dir, Directory taxDir, boolean asc) throws IOException {
+  private void buildIndexWithFacets(Directory dir, Directory taxDir, boolean asc, FacetIndexingParams fip) throws IOException {
     IndexWriterConfig config = newIndexWriterConfig(TEST_VERSION_CURRENT, 
         new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false));
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, config);
@@ -103,7 +102,7 @@ public class OrdinalMappingReaderTest ex
         int facetValue = asc? j: NUM_DOCS - j;
         categoryPaths.add(new CategoryPath("tag", Integer.toString(facetValue)));
       }
-      FacetFields facetFields = new FacetFields(taxonomyWriter);
+      FacetFields facetFields = new FacetFields(taxonomyWriter, fip);
       facetFields.addFields(doc, categoryPaths);
       writer.addDocument(doc);
     }    

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/TestFacetsPayloadMigrationReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/TestFacetsPayloadMigrationReader.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/TestFacetsPayloadMigrationReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/TestFacetsPayloadMigrationReader.java Thu Jan 24 21:19:52 2013
@@ -21,6 +21,7 @@ import org.apache.lucene.document.Field.
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.StringField;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
 import org.apache.lucene.facet.index.params.PerDimensionIndexingParams;
@@ -61,8 +62,6 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.IntsRef;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -82,9 +81,9 @@ import org.junit.Test;
  * limitations under the License.
  */
 
+
 /** Tests facets index migration from payload to DocValues.*/
-@SuppressCodecs("Lucene3x")
-public class TestFacetsPayloadMigrationReader extends LuceneTestCase {
+public class TestFacetsPayloadMigrationReader extends FacetTestCase {
   
   private static class PayloadFacetFields extends FacetFields {
 

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/CategoryListParamsTest.java Thu Jan 24 21:19:52 2013
@@ -1,6 +1,6 @@
 package org.apache.lucene.facet.index.params;
 
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.util.encoding.DGapVInt8IntEncoder;
 import org.apache.lucene.util.encoding.IntDecoder;
 import org.apache.lucene.util.encoding.IntEncoder;
@@ -25,7 +25,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class CategoryListParamsTest extends LuceneTestCase {
+public class CategoryListParamsTest extends FacetTestCase {
 
   @Test
   public void testDefaultSettings() {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/FacetIndexingParamsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/FacetIndexingParamsTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/FacetIndexingParamsTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/FacetIndexingParamsTest.java Thu Jan 24 21:19:52 2013
@@ -1,10 +1,10 @@
 package org.apache.lucene.facet.index.params;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.search.DrillDown;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.util.PartitionsUtils;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
 /*
@@ -24,7 +24,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class FacetIndexingParamsTest extends LuceneTestCase {
+public class FacetIndexingParamsTest extends FacetTestCase {
 
   @Test
   public void testDefaultSettings() {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/PerDimensionIndexingParamsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/PerDimensionIndexingParamsTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/PerDimensionIndexingParamsTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/index/params/PerDimensionIndexingParamsTest.java Thu Jan 24 21:19:52 2013
@@ -2,11 +2,11 @@ package org.apache.lucene.facet.index.pa
 
 import java.util.Collections;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.search.DrillDown;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.util.PartitionsUtils;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
 /*
@@ -26,7 +26,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class PerDimensionIndexingParamsTest extends LuceneTestCase {
+public class PerDimensionIndexingParamsTest extends FacetTestCase {
 
   @Test
   public void testTopLevelSettings() {
@@ -41,7 +41,6 @@ public class PerDimensionIndexingParamsT
     assertEquals("3 characters should be written", 3, numchars);
     assertEquals("wrong drill-down term text", expectedDDText, new String(buf, 0, numchars));
     
-    CategoryListParams clParams = ifip.getCategoryListParams(null);
     assertEquals("partition for all ordinals is the first", "", PartitionsUtils.partitionNameByOrdinal(ifip, 250));
     assertEquals("for partition 0, the same name should be returned", "", PartitionsUtils.partitionName(0));
     assertEquals("for any other, it's the concatenation of name + partition", PartitionsUtils.PART_NAME_PREFIX + "1", PartitionsUtils.partitionName(1));

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CategoryListIteratorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CategoryListIteratorTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CategoryListIteratorTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CategoryListIteratorTest.java Thu Jan 24 21:19:52 2013
@@ -7,14 +7,13 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.StraightBytesDocValuesField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IntsRef;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.encoding.DGapIntEncoder;
 import org.apache.lucene.util.encoding.IntEncoder;
 import org.apache.lucene.util.encoding.SortingIntEncoder;
@@ -39,8 +38,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class CategoryListIteratorTest extends LuceneTestCase {
+public class CategoryListIteratorTest extends FacetTestCase {
 
   static final IntsRef[] data = new IntsRef[] {
     new IntsRef(new int[] { 1, 2 }, 0, 2), 
@@ -50,9 +48,9 @@ public class CategoryListIteratorTest ex
   };
 
   @Test
-  public void testPayloadCategoryListIteraor() throws Exception {
+  public void test() throws Exception {
     Directory dir = newDirectory();
-    final IntEncoder encoder = new SortingIntEncoder(new UniqueValuesIntEncoder(new DGapIntEncoder(new VInt8IntEncoder())));
+    final IntEncoder encoder = randomCategoryListParams().createEncoder();
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, newIndexWriterConfig(TEST_VERSION_CURRENT, 
         new MockAnalyzer(random(), MockTokenizer.KEYWORD, false)).setMergePolicy(newLogMergePolicy()));
     BytesRef buf = new BytesRef();
@@ -91,7 +89,7 @@ public class CategoryListIteratorTest ex
   }
 
   @Test
-  public void testPayloadIteratorWithInvalidDoc() throws Exception {
+  public void testEmptyDocuments() throws Exception {
     Directory dir = newDirectory();
     final IntEncoder encoder = new SortingIntEncoder(new UniqueValuesIntEncoder(new DGapIntEncoder(new VInt8IntEncoder())));
     // NOTE: test is wired to LogMP... because test relies on certain docids having payloads

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java Thu Jan 24 21:19:52 2013
@@ -13,6 +13,7 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.document.StringField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
@@ -40,8 +41,6 @@ import org.apache.lucene.search.MatchAll
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.collections.ObjectToIntMap;
 import org.apache.lucene.util.encoding.IntEncoder;
 import org.apache.lucene.util.encoding.VInt8IntEncoder;
@@ -66,8 +65,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class CountingFacetsCollectorTest extends LuceneTestCase {
+public class CountingFacetsCollectorTest extends FacetTestCase {
   
   private static final Term A = new Term("f", "a");
   private static final CategoryPath CP_A = new CategoryPath("A"), CP_B = new CategoryPath("B");

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/DrillDownTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/DrillDownTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/DrillDownTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/DrillDownTest.java Thu Jan 24 21:19:52 2013
@@ -10,6 +10,7 @@ import org.apache.lucene.analysis.MockTo
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
@@ -27,8 +28,6 @@ import org.apache.lucene.search.ScoreDoc
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -50,10 +49,9 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class DrillDownTest extends LuceneTestCase {
+public class DrillDownTest extends FacetTestCase {
   
-  private FacetIndexingParams defaultParams = FacetIndexingParams.ALL_PARENTS;
+  private FacetIndexingParams defaultParams;
   private PerDimensionIndexingParams nonDefaultParams;
   private static IndexReader reader;
   private static DirectoryTaxonomyReader taxo;
@@ -62,9 +60,10 @@ public class DrillDownTest extends Lucen
   
   public DrillDownTest() {
     Map<CategoryPath,CategoryListParams> paramsMap = new HashMap<CategoryPath,CategoryListParams>();
-    paramsMap.put(new CategoryPath("a"), new CategoryListParams("testing_facets_a"));
-    paramsMap.put(new CategoryPath("b"), new CategoryListParams("testing_facets_b"));
+    paramsMap.put(new CategoryPath("a"), randomCategoryListParams("testing_facets_a"));
+    paramsMap.put(new CategoryPath("b"), randomCategoryListParams("testing_facets_b"));
     nonDefaultParams = new PerDimensionIndexingParams(paramsMap);
+    defaultParams = new FacetIndexingParams(randomCategoryListParams(CategoryListParams.DEFAULT_FIELD));
   }
 
   @BeforeClass

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestDemoFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestDemoFacets.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestDemoFacets.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestDemoFacets.java Thu Jan 24 21:19:52 2013
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.FacetTestUtils;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.search.params.CountFacetRequest;
@@ -40,15 +41,12 @@ import org.apache.lucene.search.IndexSea
 import org.apache.lucene.search.MatchAllDocsQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 
-@SuppressCodecs("Lucene3x")
-public class TestDemoFacets extends LuceneTestCase {
+public class TestDemoFacets extends FacetTestCase {
 
   private DirectoryTaxonomyWriter taxoWriter;
   private RandomIndexWriter writer;
-  private FacetFields docBuilder;
+  private FacetFields facetFields;
 
   private void add(String ... categoryPaths) throws IOException {
     Document doc = new Document();
@@ -57,7 +55,7 @@ public class TestDemoFacets extends Luce
     for(String categoryPath : categoryPaths) {
       paths.add(new CategoryPath(categoryPath, '/'));
     }
-    docBuilder.addFields(doc, paths);
+    facetFields.addFields(doc, paths);
     writer.addDocument(doc);
   }
 
@@ -72,7 +70,7 @@ public class TestDemoFacets extends Luce
 
     // Reused across documents, to add the necessary facet
     // fields:
-    docBuilder = new FacetFields(taxoWriter);
+    facetFields = new FacetFields(taxoWriter);
 
     add("Author/Bob", "Publish Date/2010/10/15");
     add("Author/Lisa", "Publish Date/2010/10/20");

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetArrays.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetArrays.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetArrays.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetArrays.java Thu Jan 24 21:19:52 2013
@@ -1,6 +1,6 @@
 package org.apache.lucene.facet.search;
 
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
 /*
@@ -20,7 +20,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class TestFacetArrays extends LuceneTestCase {
+public class TestFacetArrays extends FacetTestCase {
 
   @Test
   public void testFacetArrays() {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsAccumulatorWithComplement.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsAccumulatorWithComplement.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsAccumulatorWithComplement.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsAccumulatorWithComplement.java Thu Jan 24 21:19:52 2013
@@ -123,15 +123,10 @@ public class TestFacetsAccumulatorWithCo
     
   }
   
-  private FacetSearchParams getFacetSearchParams() {
-    return new FacetSearchParams(new CountFacetRequest(new CategoryPath("root","a"), 10));
-  }
-  
   /** compute facets with certain facet requests and docs */
   private List<FacetResult> findFacets(ScoredDocIDs sDocids, boolean withComplement) throws IOException {
-    
-    FacetsAccumulator fAccumulator = 
-      new StandardFacetsAccumulator(getFacetSearchParams(), indexReader, taxoReader);
+    FacetSearchParams fsp = new FacetSearchParams(getFacetIndexingParams(Integer.MAX_VALUE), new CountFacetRequest(new CategoryPath("root","a"), 10));
+    FacetsAccumulator fAccumulator = new StandardFacetsAccumulator(fsp, indexReader, taxoReader);
     
     fAccumulator.setComplementThreshold(
         withComplement ? 

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsCollector.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsCollector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestFacetsCollector.java Thu Jan 24 21:19:52 2013
@@ -7,6 +7,7 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.document.StringField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.search.params.FacetSearchParams;
 import org.apache.lucene.facet.search.params.ScoreFacetRequest;
@@ -24,8 +25,6 @@ import org.apache.lucene.search.MultiCol
 import org.apache.lucene.search.TopScoreDocCollector;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -45,8 +44,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestFacetsCollector extends LuceneTestCase {
+public class TestFacetsCollector extends FacetTestCase {
 
   @Test
   public void testFacetsWithDocScore() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestMultipleCategoryLists.java Thu Jan 24 21:19:52 2013
@@ -13,6 +13,7 @@ import org.apache.lucene.analysis.MockTo
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.FacetTestUtils;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.CategoryListParams;
@@ -41,8 +42,6 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TopScoreDocCollector;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -62,8 +61,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestMultipleCategoryLists extends LuceneTestCase {
+public class TestMultipleCategoryLists extends FacetTestCase {
 
   private static final CategoryPath[] CATEGORIES = new CategoryPath[] {
     new CategoryPath("Author", "Mark Twain"),

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestScoredDocIdCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestScoredDocIdCollector.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestScoredDocIdCollector.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestScoredDocIdCollector.java Thu Jan 24 21:19:52 2013
@@ -4,24 +4,18 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.TermQuery;
-import org.junit.Before;
-import org.junit.Test;
-
 import org.apache.lucene.facet.FacetTestBase;
-import org.apache.lucene.facet.search.FacetsAccumulator;
-import org.apache.lucene.facet.search.ScoredDocIDs;
-import org.apache.lucene.facet.search.ScoredDocIDsIterator;
-import org.apache.lucene.facet.search.ScoredDocIdCollector;
-import org.apache.lucene.facet.search.StandardFacetsAccumulator;
 import org.apache.lucene.facet.search.params.CountFacetRequest;
 import org.apache.lucene.facet.search.params.FacetSearchParams;
 import org.apache.lucene.facet.search.params.ScoreFacetRequest;
 import org.apache.lucene.facet.search.results.FacetResult;
 import org.apache.lucene.facet.search.results.FacetResultNode;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.TermQuery;
+import org.junit.Before;
+import org.junit.Test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -65,8 +59,7 @@ public class TestScoredDocIdCollector ex
       System.out.println("Query: " + q);
     }
     float constScore = 17.0f;
-    ScoredDocIdCollector dCollector = ScoredDocIdCollector.create(indexReader
-        .maxDoc(), false); // scoring is disabled
+    ScoredDocIdCollector dCollector = ScoredDocIdCollector.create(indexReader.maxDoc(), false); // scoring is disabled
     dCollector.setDefaultScore(constScore);
     searcher.search(q, dCollector);
 
@@ -75,13 +68,16 @@ public class TestScoredDocIdCollector ex
     assertEquals("Wrong number of matching documents!", 2, scoredDocIDs.size());
     ScoredDocIDsIterator docItr = scoredDocIDs.iterator();
     while (docItr.next()) {
-      assertEquals("Wrong score for doc " + docItr.getDocID(), constScore,
-          docItr.getScore(), Double.MIN_VALUE);
+      assertEquals("Wrong score for doc " + docItr.getDocID(), constScore, docItr.getScore(), Double.MIN_VALUE);
     }
 
     // verify by facet values
-    List<FacetResult> countRes = findFacets(scoredDocIDs, getFacetSearchParams());
-    List<FacetResult> scoreRes = findFacets(scoredDocIDs, sumScoreSearchParams());
+    CategoryPath cp = new CategoryPath("root","a");
+    FacetSearchParams countFSP = new FacetSearchParams(getFacetIndexingParams(Integer.MAX_VALUE), new CountFacetRequest(cp, 10));
+    FacetSearchParams scoreFSP = new FacetSearchParams(getFacetIndexingParams(Integer.MAX_VALUE), new ScoreFacetRequest(cp, 10));
+    
+    List<FacetResult> countRes = findFacets(scoredDocIDs, countFSP);
+    List<FacetResult> scoreRes = findFacets(scoredDocIDs, scoreFSP);
 
     assertEquals("Wrong number of facet count results!", 1, countRes.size());
     assertEquals("Wrong number of facet score results!", 1, scoreRes.size());
@@ -151,14 +147,4 @@ public class TestScoredDocIdCollector ex
     }
   }
 
-  /* use a scoring aggregator */
-  private FacetSearchParams sumScoreSearchParams() {
-    // this will use default faceted indexing params, not altering anything about indexing
-    return new FacetSearchParams(new ScoreFacetRequest(new CategoryPath("root", "a"), 10));
-  }
-
-  private FacetSearchParams getFacetSearchParams() {
-    return new FacetSearchParams(new CountFacetRequest(new CategoryPath("root","a"), 10));
-  }
-
-}
\ No newline at end of file
+}

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestStandardFacetsAccumulator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestStandardFacetsAccumulator.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestStandardFacetsAccumulator.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestStandardFacetsAccumulator.java Thu Jan 24 21:19:52 2013
@@ -8,6 +8,7 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.document.StringField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
@@ -32,8 +33,6 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -53,8 +52,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestStandardFacetsAccumulator extends LuceneTestCase {
+public class TestStandardFacetsAccumulator extends FacetTestCase {
   
   private void indexTwoDocs(IndexWriter indexWriter, FacetFields facetFields, boolean withContent) throws Exception {
     for (int i = 0; i < 2; i++) {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTopKInEachNodeResultHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTopKInEachNodeResultHandler.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTopKInEachNodeResultHandler.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTopKInEachNodeResultHandler.java Thu Jan 24 21:19:52 2013
@@ -9,6 +9,7 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
 import org.apache.lucene.facet.search.params.CountFacetRequest;
@@ -30,8 +31,6 @@ import org.apache.lucene.search.IndexSea
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -51,8 +50,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestTopKInEachNodeResultHandler extends LuceneTestCase {
+public class TestTopKInEachNodeResultHandler extends FacetTestCase {
 
   //TODO (Facet): Move to extend BaseTestTopK and separate to several smaller test cases (methods) - see TestTopKResultsHandler
   

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCounts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCounts.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCounts.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCounts.java Thu Jan 24 21:19:52 2013
@@ -4,15 +4,14 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.FacetTestUtils;
 import org.apache.lucene.facet.FacetTestUtils.IndexTaxonomyReaderPair;
 import org.apache.lucene.facet.FacetTestUtils.IndexTaxonomyWriterPair;
 import org.apache.lucene.facet.index.params.FacetIndexingParams;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -32,8 +31,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestTotalFacetCounts extends LuceneTestCase {
+public class TestTotalFacetCounts extends FacetTestCase {
 
   private static void initCache(int numEntries) {
     TotalFacetCountsCache.getSingleton().clear();
@@ -55,8 +53,7 @@ public class TestTotalFacetCounts extend
     // Create temporary RAMDirectories
     Directory[][] dirs = FacetTestUtils.createIndexTaxonomyDirs(1);
     // Create our index/taxonomy writers
-    IndexTaxonomyWriterPair[] writers = FacetTestUtils
-    .createIndexTaxonomyWriterPair(dirs);
+    IndexTaxonomyWriterPair[] writers = FacetTestUtils.createIndexTaxonomyWriterPair(dirs);
     FacetIndexingParams iParams = new FacetIndexingParams() {
       @Override
       public int getPartitionSize() {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCountsCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCountsCache.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCountsCache.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/TestTotalFacetCountsCache.java Thu Jan 24 21:19:52 2013
@@ -8,6 +8,7 @@ import java.util.List;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.FacetTestUtils;
 import org.apache.lucene.facet.FacetTestUtils.IndexTaxonomyReaderPair;
 import org.apache.lucene.facet.FacetTestUtils.IndexTaxonomyWriterPair;
@@ -32,10 +33,8 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.SlowRAMDirectory;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -56,8 +55,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestTotalFacetCountsCache extends LuceneTestCase {
+public class TestTotalFacetCountsCache extends FacetTestCase {
 
   static final TotalFacetCountsCache TFC = TotalFacetCountsCache.getSingleton();
 

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/associations/AssociationsFacetRequestTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/associations/AssociationsFacetRequestTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/associations/AssociationsFacetRequestTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/associations/AssociationsFacetRequestTest.java Thu Jan 24 21:19:52 2013
@@ -5,6 +5,7 @@ import java.util.List;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.associations.AssociationsFacetFields;
 import org.apache.lucene.facet.associations.CategoryAssociationsContainer;
 import org.apache.lucene.facet.associations.CategoryFloatAssociation;
@@ -24,8 +25,6 @@ import org.apache.lucene.search.IndexSea
 import org.apache.lucene.search.MatchAllDocsQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -47,8 +46,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class AssociationsFacetRequestTest extends LuceneTestCase {
+public class AssociationsFacetRequestTest extends FacetTestCase {
 
   private static Directory dir;
   private static IndexReader reader;

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java Thu Jan 24 21:19:52 2013
@@ -1,15 +1,14 @@
 package org.apache.lucene.facet.search.params;
 
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.store.Directory;
-import org.junit.Test;
-
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.search.FacetResultsHandler;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.TaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.IndexWriterConfig;
+import org.apache.lucene.store.Directory;
+import org.junit.Test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -28,7 +27,7 @@ import org.apache.lucene.facet.taxonomy.
  * limitations under the License.
  */
 
-public class FacetRequestTest extends LuceneTestCase {
+public class FacetRequestTest extends FacetTestCase {
 
   @Test(expected=IllegalArgumentException.class)
   public void testIllegalNumResults() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetSearchParamsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetSearchParamsTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetSearchParamsTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/FacetSearchParamsTest.java Thu Jan 24 21:19:52 2013
@@ -1,6 +1,6 @@
 package org.apache.lucene.facet.search.params;
 
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
 /*
@@ -20,7 +20,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class FacetSearchParamsTest extends LuceneTestCase {
+public class FacetSearchParamsTest extends FacetTestCase {
 
   @Test
   public void testSearchParamsWithNullRequest() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/MultiCategoryListIteratorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/MultiCategoryListIteratorTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/MultiCategoryListIteratorTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/params/MultiCategoryListIteratorTest.java Thu Jan 24 21:19:52 2013
@@ -5,6 +5,7 @@ import java.util.HashMap;
 import java.util.Random;
 
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.index.params.CategoryListParams;
 import org.apache.lucene.facet.index.params.PerDimensionIndexingParams;
@@ -22,8 +23,6 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.IntsRef;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.encoding.IntDecoder;
 import org.junit.Test;
 
@@ -44,8 +43,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class MultiCategoryListIteratorTest extends LuceneTestCase {
+public class MultiCategoryListIteratorTest extends FacetTestCase {
 
   @Test
   public void testMultipleCategoryLists() throws Exception {
@@ -60,7 +58,7 @@ public class MultiCategoryListIteratorTe
     HashMap<CategoryPath,CategoryListParams> clps = new HashMap<CategoryPath,CategoryListParams>();
     for (String dim : dimensions) {
       CategoryPath cp = new CategoryPath(dim);
-      CategoryListParams clp = new CategoryListParams("$" + dim);
+      CategoryListParams clp = randomCategoryListParams("$" + dim);
       clps.put(cp, clp);
     }
     PerDimensionIndexingParams indexingParams = new PerDimensionIndexingParams(clps);

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/sampling/OversampleWithDepthTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/sampling/OversampleWithDepthTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/sampling/OversampleWithDepthTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/search/sampling/OversampleWithDepthTest.java Thu Jan 24 21:19:52 2013
@@ -5,7 +5,9 @@ import java.util.Collections;
 
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
+import org.apache.lucene.facet.index.params.FacetIndexingParams;
 import org.apache.lucene.facet.search.FacetsAccumulator;
 import org.apache.lucene.facet.search.FacetsCollector;
 import org.apache.lucene.facet.search.StandardFacetsCollector;
@@ -20,7 +22,6 @@ import org.apache.lucene.facet.taxonomy.
 import org.apache.lucene.facet.taxonomy.TaxonomyWriter;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter;
-import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
@@ -28,10 +29,7 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.MatchAllDocsQuery;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Test;
 
 /*
@@ -51,17 +49,18 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class OversampleWithDepthTest extends LuceneTestCase {
+public class OversampleWithDepthTest extends FacetTestCase {
   
   @Test
   public void testCountWithdepthUsingSampling() throws Exception, IOException {
     Directory indexDir = newDirectory();
     Directory taxoDir = newDirectory();
     
+    FacetIndexingParams fip = new FacetIndexingParams(randomCategoryListParams());
+    
     // index 100 docs, each with one category: ["root", docnum/10, docnum]
     // e.g. root/8/87
-    index100Docs(indexDir, taxoDir);
+    index100Docs(indexDir, taxoDir, fip);
     
     DirectoryReader r = DirectoryReader.open(indexDir);
     TaxonomyReader tr = new DirectoryTaxonomyReader(taxoDir);
@@ -71,7 +70,7 @@ public class OversampleWithDepthTest ext
     facetRequest.setDepth(2);
     facetRequest.setResultMode(ResultMode.PER_NODE_IN_TREE);
 
-    FacetSearchParams fsp = new FacetSearchParams(facetRequest);
+    FacetSearchParams fsp = new FacetSearchParams(fip, facetRequest);
     
     // Craft sampling params to enforce sampling
     final SamplingParams params = new SamplingParams();
@@ -95,13 +94,12 @@ public class OversampleWithDepthTest ext
     IOUtils.close(r, tr, indexDir, taxoDir);
   }
 
-  private void index100Docs(Directory indexDir, Directory taxoDir)
-      throws CorruptIndexException, LockObtainFailedException, IOException {
+  private void index100Docs(Directory indexDir, Directory taxoDir, FacetIndexingParams fip) throws IOException {
     IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new KeywordAnalyzer());
     IndexWriter w = new IndexWriter(indexDir, iwc);
     TaxonomyWriter tw = new DirectoryTaxonomyWriter(taxoDir);
     
-    FacetFields facetFields = new FacetFields(tw);
+    FacetFields facetFields = new FacetFields(tw, fip);
     for (int i = 0; i < 100; i++) {
       Document doc = new Document();
       CategoryPath cp = new CategoryPath("root",Integer.toString(i / 10), Integer.toString(i));

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestCategoryPath.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestCategoryPath.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestCategoryPath.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestCategoryPath.java Thu Jan 24 21:19:52 2013
@@ -1,6 +1,6 @@
 package org.apache.lucene.facet.taxonomy;
 
-import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
 /*
@@ -20,7 +20,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class TestCategoryPath extends LuceneTestCase {
+public class TestCategoryPath extends FacetTestCase {
   
   @Test 
   public void testBasic() {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyCombined.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyCombined.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyCombined.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyCombined.java Thu Jan 24 21:19:52 2013
@@ -7,13 +7,13 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter;
 import org.apache.lucene.facet.taxonomy.directory.ParallelTaxonomyArrays;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.LockObtainFailedException;
 import org.apache.lucene.store.RAMDirectory;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.SlowRAMDirectory;
 import org.junit.Test;
@@ -36,8 +36,8 @@ import org.junit.Test;
  */
 
 // TODO: remove this suppress if we fix the TaxoWriter Codec to a non-default (see todo in DirTW)
-@SuppressCodecs("SimpleText")
-public class TestTaxonomyCombined extends LuceneTestCase {
+@SuppressCodecs({"SimpleText","Lucene3x"})
+public class TestTaxonomyCombined extends FacetTestCase {
 
   /**  The following categories will be added to the taxonomy by
     fillTaxonomy(), and tested by all tests below:

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java Thu Jan 24 21:19:52 2013
@@ -5,13 +5,13 @@ import java.util.HashSet;
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
 
 /*
@@ -31,7 +31,7 @@ import org.apache.lucene.util._TestUtil;
  * limitations under the License.
  */
 
-public class TestAddTaxonomy extends LuceneTestCase {
+public class TestAddTaxonomy extends FacetTestCase {
 
   private void dotest(int ncats, final int range) throws Exception {
     final AtomicInteger numCats = new AtomicInteger(ncats);

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestConcurrentFacetedIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestConcurrentFacetedIndexing.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestConcurrentFacetedIndexing.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestConcurrentFacetedIndexing.java Thu Jan 24 21:19:52 2013
@@ -8,6 +8,7 @@ import java.util.concurrent.ConcurrentHa
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.lucene.document.Document;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.index.FacetFields;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache;
@@ -17,8 +18,6 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,8 +36,7 @@ import org.apache.lucene.util.LuceneTest
  * limitations under the License.
  */
 
-@SuppressCodecs("Lucene3x")
-public class TestConcurrentFacetedIndexing extends LuceneTestCase {
+public class TestConcurrentFacetedIndexing extends FacetTestCase {
 
   // A No-Op TaxonomyWriterCache which always discards all given categories, and
   // always returns true in put(), to indicate some cache entries were cleared.

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyReader.java Thu Jan 24 21:19:52 2013
@@ -4,6 +4,7 @@ import java.io.IOException;
 import java.util.Random;
 
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.TaxonomyReader;
 import org.apache.lucene.facet.taxonomy.TaxonomyWriter;
@@ -16,7 +17,6 @@ import org.apache.lucene.store.AlreadyCl
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
 /*
@@ -36,7 +36,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class TestDirectoryTaxonomyReader extends LuceneTestCase {
+public class TestDirectoryTaxonomyReader extends FacetTestCase {
 
   @Test
   public void testCloseAfterIncRef() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyWriter.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestDirectoryTaxonomyWriter.java Thu Jan 24 21:19:52 2013
@@ -7,6 +7,7 @@ import java.util.Random;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.facet.taxonomy.TaxonomyReader;
 import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
@@ -21,7 +22,6 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.index.SegmentInfos;
 import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
 /*
@@ -41,7 +41,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class TestDirectoryTaxonomyWriter extends LuceneTestCase {
+public class TestDirectoryTaxonomyWriter extends FacetTestCase {
 
   // A No-Op TaxonomyWriterCache which always discards all given categories, and
   // always returns true in put(), to indicate some cache entries were cleared.

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCharBlockArray.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCharBlockArray.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCharBlockArray.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCharBlockArray.java Thu Jan 24 21:19:52 2013
@@ -9,11 +9,9 @@ import java.nio.ByteBuffer;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CodingErrorAction;
 
-import org.junit.Test;
-
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray;
+import org.junit.Test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,7 +30,7 @@ import org.apache.lucene.facet.taxonomy.
  * limitations under the License.
  */
 
-public class TestCharBlockArray extends LuceneTestCase {
+public class TestCharBlockArray extends FacetTestCase {
 
   @Test public void testArray() throws Exception {
     CharBlockArray array = new CharBlockArray();

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCompactLabelToOrdinal.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCompactLabelToOrdinal.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCompactLabelToOrdinal.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/cl2o/TestCompactLabelToOrdinal.java Thu Jan 24 21:19:52 2013
@@ -8,14 +8,11 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
 
-import org.junit.Test;
-
+import org.apache.lucene.facet.FacetTestCase;
+import org.apache.lucene.facet.taxonomy.CategoryPath;
 import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.apache.lucene.facet.taxonomy.CategoryPath;
-import org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal;
-import org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal;
+import org.junit.Test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -34,7 +31,7 @@ import org.apache.lucene.facet.taxonomy.
  * limitations under the License.
  */
 
-public class TestCompactLabelToOrdinal extends LuceneTestCase {
+public class TestCompactLabelToOrdinal extends FacetTestCase {
 
   @Test
   public void testL2O() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/util/TestScoredDocIDsUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/util/TestScoredDocIDsUtils.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/util/TestScoredDocIDsUtils.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/facet/util/TestScoredDocIDsUtils.java Thu Jan 24 21:19:52 2013
@@ -9,6 +9,7 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.StringField;
+import org.apache.lucene.facet.FacetTestCase;
 import org.apache.lucene.facet.search.ScoredDocIDs;
 import org.apache.lucene.facet.search.ScoredDocIDsIterator;
 import org.apache.lucene.facet.search.ScoredDocIdCollector;
@@ -25,7 +26,6 @@ import org.apache.lucene.search.TermQuer
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.FixedBitSet;
-import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
 /*
@@ -45,7 +45,7 @@ import org.junit.Test;
  * limitations under the License.
  */
 
-public class TestScoredDocIDsUtils extends LuceneTestCase {
+public class TestScoredDocIDsUtils extends FacetTestCase {
 
   @Test
   public void testComplementIterator() throws Exception {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayInputStreamTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayInputStreamTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayInputStreamTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayInputStreamTest.java Thu Jan 24 21:19:52 2013
@@ -3,11 +3,9 @@ package org.apache.lucene.util;
 import java.io.IOException;
 import java.util.Arrays;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.UnsafeByteArrayInputStream;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -25,7 +23,7 @@ import org.apache.lucene.util.UnsafeByte
  * limitations under the License.
  */
 
-public class UnsafeByteArrayInputStreamTest extends LuceneTestCase {
+public class UnsafeByteArrayInputStreamTest extends FacetTestCase {
 
   @Test
   public void testSimple() throws IOException {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayOutputStreamTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayOutputStreamTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayOutputStreamTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/UnsafeByteArrayOutputStreamTest.java Thu Jan 24 21:19:52 2013
@@ -2,11 +2,9 @@ package org.apache.lucene.util;
 
 import java.io.IOException;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.UnsafeByteArrayOutputStream;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -24,7 +22,7 @@ import org.apache.lucene.util.UnsafeByte
  * limitations under the License.
  */
 
-public class UnsafeByteArrayOutputStreamTest extends LuceneTestCase {
+public class UnsafeByteArrayOutputStreamTest extends FacetTestCase {
 
   @Test
   public void testSimpleWrite() throws IOException {

Modified: lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ArrayHashMapTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ArrayHashMapTest.java?rev=1438199&r1=1438198&r2=1438199&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ArrayHashMapTest.java (original)
+++ lucene/dev/branches/branch_4x/lucene/facet/src/test/org/apache/lucene/util/collections/ArrayHashMapTest.java Thu Jan 24 21:19:52 2013
@@ -4,11 +4,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Random;
 
+import org.apache.lucene.facet.FacetTestCase;
 import org.junit.Test;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.collections.ArrayHashMap;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -26,7 +24,7 @@ import org.apache.lucene.util.collection
  * limitations under the License.
  */
 
-public class ArrayHashMapTest extends LuceneTestCase {
+public class ArrayHashMapTest extends FacetTestCase {
 
   public static final int RANDOM_TEST_NUM_ITERATIONS = 100; // set to 100,000 for deeper test