mirror of https://github.com/apache/lucene.git
fix javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1436626 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ba93c7f02
commit
16520a097d
|
@ -202,7 +202,7 @@ public class FacetsPayloadMigrationReader extends FilterAtomicReader {
|
|||
private final Map<String,Term> 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<String,Term> fieldTerms) {
|
||||
|
|
|
@ -63,12 +63,9 @@ import org.apache.lucene.util.encoding.DGapVInt8IntDecoder;
|
|||
* </ul>
|
||||
*
|
||||
* <p>
|
||||
* <b>NOTE:</b> this colletro uses {@link DocValues#getSource()} by default,
|
||||
* <b>NOTE:</b> 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.
|
||||
*
|
||||
* <p>
|
||||
* <b>NOTE:</b> 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<BinaryDocValues,FixedBitSet> matchingDocs = new HashMap<BinaryDocValues,FixedBitSet>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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<FacetResult> facetResults = fc.getFacetResults();
|
||||
|
|
Loading…
Reference in New Issue