com.browseengine.bobo.facets.impl.VirtualSimpleFacetHandler 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 java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import org.apache.lucene.util.Bits;
import com.browseengine.bobo.api.BoboSegmentReader;
import com.browseengine.bobo.facets.data.FacetDataCache;
import com.browseengine.bobo.facets.data.FacetDataFetcher;
import com.browseengine.bobo.facets.data.TermFixedLengthLongArrayListFactory;
import com.browseengine.bobo.facets.data.TermListFactory;
import com.browseengine.bobo.facets.data.TermStringList;
import com.browseengine.bobo.facets.data.TermValueList;
import com.browseengine.bobo.util.BigIntArray;
import com.browseengine.bobo.util.BigSegmentedArray;
public class VirtualSimpleFacetHandler extends SimpleFacetHandler {
protected FacetDataFetcher _facetDataFetcher;
public VirtualSimpleFacetHandler(String name, String indexFieldName,
TermListFactory> termListFactory, FacetDataFetcher facetDataFetcher, Set dependsOn) {
super(name, null, termListFactory, dependsOn);
_facetDataFetcher = facetDataFetcher;
}
public VirtualSimpleFacetHandler(String name, TermListFactory> termListFactory,
FacetDataFetcher facetDataFetcher, Set dependsOn) {
this(name, null, termListFactory, facetDataFetcher, dependsOn);
}
@Override
public FacetDataCache> load(BoboSegmentReader reader) throws IOException {
TreeMap