com.browseengine.bobo.facets.impl.MultiValuedPathFacetCountCollector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bobo-browse Show documentation
Show all versions of bobo-browse Show documentation
Bobo is a Faceted Search implementation written purely in Java, an extension of Apache Lucene
The newest version!
package com.browseengine.bobo.facets.impl;
import com.browseengine.bobo.api.BrowseSelection;
import com.browseengine.bobo.api.FacetSpec;
import com.browseengine.bobo.facets.data.FacetDataCache;
import com.browseengine.bobo.facets.data.MultiValueFacetDataCache;
import com.browseengine.bobo.util.BigIntArray;
import com.browseengine.bobo.util.BigNestedIntArray;
public class MultiValuedPathFacetCountCollector extends PathFacetCountCollector {
private final BigNestedIntArray _array;
public MultiValuedPathFacetCountCollector(String name, String sep, BrowseSelection sel,
FacetSpec ospec, FacetDataCache> dataCache) {
super(name, sep, sel, ospec, dataCache);
_array = ((MultiValueFacetDataCache>) (dataCache))._nestedArray;
}
@Override
public final void collect(int docid) {
_array.countNoReturn(docid, _count);
}
@Override
public final void collectAll() {
_count = BigIntArray.fromArray(_dataCache.freqs);
}
}