From 16520a097d4785d841d41ff0dcd2a5fc05ac178c Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 21 Jan 2013 21:17:55 +0000 Subject: [PATCH] fix javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1436626 13f79535-47bb-0310-9956-ffa450edef68 --- .../facet/index/FacetsPayloadMigrationReader.java | 2 +- .../facet/search/CountingFacetsCollector.java | 14 ++++---------- .../facet/search/CountingFacetsCollectorTest.java | 2 +- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lucene/facet/src/java/org/apache/lucene/facet/index/FacetsPayloadMigrationReader.java b/lucene/facet/src/java/org/apache/lucene/facet/index/FacetsPayloadMigrationReader.java index a469e879bf3..d8181133aad 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/index/FacetsPayloadMigrationReader.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/index/FacetsPayloadMigrationReader.java @@ -202,7 +202,7 @@ public class FacetsPayloadMigrationReader extends FilterAtomicReader { private final Map fieldTerms; /** - * Wraps an {@link AtomicReader} and migrates the payload to {@link DocValues} + * Wraps an {@link AtomicReader} and migrates the payload to {@link BinaryDocValues} * fields by using the given mapping. */ public FacetsPayloadMigrationReader(AtomicReader in, Map fieldTerms) { diff --git a/lucene/facet/src/java/org/apache/lucene/facet/search/CountingFacetsCollector.java b/lucene/facet/src/java/org/apache/lucene/facet/search/CountingFacetsCollector.java index 65db12cdb1f..e3281927b67 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/search/CountingFacetsCollector.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/search/CountingFacetsCollector.java @@ -63,12 +63,9 @@ import org.apache.lucene.util.encoding.DGapVInt8IntDecoder; * * *

- * NOTE: this colletro uses {@link DocValues#getSource()} by default, + * NOTE: this collector uses {@link BinaryDocValues} by default, * which pre-loads the values into memory. If your application cannot afford the - * RAM, you should use - * {@link #CountingFacetsCollector(FacetSearchParams, TaxonomyReader, FacetArrays, boolean)} - * and specify to use a direct source (corresponds to - * {@link DocValues#getDirectSource()}). + * RAM, you should pick a codec which keeps the values (or parts of them) on disk. * *

* NOTE: this collector supports category lists that were indexed with @@ -87,18 +84,16 @@ public class CountingFacetsCollector extends FacetsCollector { private final FacetArrays facetArrays; private final int[] counts; private final String facetsField; - private final boolean useDirectSource; private final HashMap matchingDocs = new HashMap(); private BinaryDocValues facetsValues; private FixedBitSet bits; public CountingFacetsCollector(FacetSearchParams fsp, TaxonomyReader taxoReader) { - this(fsp, taxoReader, new FacetArrays(taxoReader.getSize()), false); + this(fsp, taxoReader, new FacetArrays(taxoReader.getSize())); } - public CountingFacetsCollector(FacetSearchParams fsp, TaxonomyReader taxoReader, FacetArrays facetArrays, - boolean useDirectSource) { + public CountingFacetsCollector(FacetSearchParams fsp, TaxonomyReader taxoReader, FacetArrays facetArrays) { assert facetArrays.arrayLength >= taxoReader.getSize() : "too small facet array"; assert assertParams(fsp) == null : assertParams(fsp); @@ -107,7 +102,6 @@ public class CountingFacetsCollector extends FacetsCollector { this.facetArrays = facetArrays; this.counts = facetArrays.getIntArray(); this.facetsField = fsp.indexingParams.getCategoryListParams(null).field; - this.useDirectSource = useDirectSource; } /** diff --git a/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java b/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java index f03a4701852..773b6973542 100644 --- a/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java +++ b/lucene/facet/src/test/org/apache/lucene/facet/search/CountingFacetsCollectorTest.java @@ -427,7 +427,7 @@ public class CountingFacetsCollectorTest extends LuceneTestCase { FacetSearchParams fsp = new FacetSearchParams(new CountFacetRequest(CP_A, NUM_CHILDREN_CP_A), new CountFacetRequest(CP_B, NUM_CHILDREN_CP_B)); - FacetsCollector fc = new CountingFacetsCollector(fsp , taxoReader, new FacetArrays(taxoReader.getSize()), true); + FacetsCollector fc = new CountingFacetsCollector(fsp , taxoReader, new FacetArrays(taxoReader.getSize())); searcher.search(new MatchAllDocsQuery(), fc); List facetResults = fc.getFacetResults();