LUCENE-5339: renames

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5339@1543213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2013-11-18 22:45:49 +00:00
parent 5126543569
commit 7027c5690e
5 changed files with 14 additions and 16 deletions

View File

@ -32,16 +32,15 @@ import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.FixedBitSet;
// nocommit rename to TaxonomySumFloatAssociationFacets
// nocommit jdoc that this assumes/requires the default encoding
public class SumFloatAssociationFacets extends TaxonomyFacets {
public class TaxonomyFacetSumFloatAssociations extends TaxonomyFacets {
private final float[] values;
public SumFloatAssociationFacets(TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
public TaxonomyFacetSumFloatAssociations(TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc);
}
public SumFloatAssociationFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
public TaxonomyFacetSumFloatAssociations(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
super(indexFieldName, taxoReader, config);
values = new float[taxoReader.getSize()];
sumValues(fc.getMatchingDocs());

View File

@ -32,16 +32,15 @@ import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.FixedBitSet;
// nocommit rename to TaxonomySumIntAssociationFacets
// nocommit jdoc that this assumes/requires the default encoding
public class SumIntAssociationFacets extends TaxonomyFacets {
public class TaxonomyFacetSumIntAssociations extends TaxonomyFacets {
private final int[] values;
public SumIntAssociationFacets(TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
public TaxonomyFacetSumIntAssociations(TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc);
}
public SumIntAssociationFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
public TaxonomyFacetSumIntAssociations(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, SimpleFacetsCollector fc) throws IOException {
super(indexFieldName, taxoReader, config);
values = new int[taxoReader.getSize()];
sumValues(fc.getMatchingDocs());

View File

@ -44,7 +44,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
/** Test for associations */
public class TestAssociationFacets extends FacetTestCase {
public class TestTaxonomyFacetAssociations extends FacetTestCase {
private static Directory dir;
private static IndexReader reader;
@ -113,7 +113,7 @@ public class TestAssociationFacets extends FacetTestCase {
IndexSearcher searcher = newSearcher(reader);
searcher.search(new MatchAllDocsQuery(), fc);
Facets facets = new SumIntAssociationFacets("$facets.int", taxoReader, config, fc);
Facets facets = new TaxonomyFacetSumIntAssociations("$facets.int", taxoReader, config, fc);
assertEquals("Wrong count for category 'a'!", 200, facets.getSpecificValue("int", "a").intValue());
assertEquals("Wrong count for category 'b'!", 150, facets.getSpecificValue("int", "b").intValue());
@ -125,7 +125,7 @@ public class TestAssociationFacets extends FacetTestCase {
IndexSearcher searcher = newSearcher(reader);
searcher.search(new MatchAllDocsQuery(), fc);
Facets facets = new SumFloatAssociationFacets("$facets.float", taxoReader, config, fc);
Facets facets = new TaxonomyFacetSumFloatAssociations("$facets.float", taxoReader, config, fc);
assertEquals("Wrong count for category 'a'!", 50f, facets.getSpecificValue("float", "a").floatValue(), 0.00001);
assertEquals("Wrong count for category 'b'!", 10f, facets.getSpecificValue("float", "b").floatValue(), 0.00001);
}
@ -138,11 +138,11 @@ public class TestAssociationFacets extends FacetTestCase {
IndexSearcher searcher = newSearcher(reader);
searcher.search(new MatchAllDocsQuery(), fc);
Facets facets = new SumFloatAssociationFacets("$facets.float", taxoReader, config, fc);
Facets facets = new TaxonomyFacetSumFloatAssociations("$facets.float", taxoReader, config, fc);
assertEquals("Wrong count for category 'a'!", 50f, facets.getSpecificValue("float", "a").floatValue(), 0.00001);
assertEquals("Wrong count for category 'b'!", 10f, facets.getSpecificValue("float", "b").floatValue(), 0.00001);
facets = new SumIntAssociationFacets("$facets.int", taxoReader, config, fc);
facets = new TaxonomyFacetSumIntAssociations("$facets.int", taxoReader, config, fc);
assertEquals("Wrong count for category 'a'!", 200, facets.getSpecificValue("int", "a").intValue());
assertEquals("Wrong count for category 'b'!", 150, facets.getSpecificValue("int", "b").intValue());
}
@ -152,7 +152,7 @@ public class TestAssociationFacets extends FacetTestCase {
IndexSearcher searcher = newSearcher(reader);
searcher.search(new MatchAllDocsQuery(), fc);
Facets facets = new SumFloatAssociationFacets(taxoReader, config, fc);
Facets facets = new TaxonomyFacetSumFloatAssociations(taxoReader, config, fc);
try {
facets.getSpecificValue("float");
fail("should have hit exc");

View File

@ -48,7 +48,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util._TestUtil;
public class TestTaxonomyFacets extends FacetTestCase {
public class TestTaxonomyFacetCounts extends FacetTestCase {
public void testBasic() throws Exception {
Directory dir = newDirectory();

View File

@ -52,7 +52,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util._TestUtil;
public class TestTaxonomyFacetsSumValueSource extends FacetTestCase {
public class TestTaxonomyFacetSumValueSource extends FacetTestCase {
public void testBasic() throws Exception {