com.browseengine.bobo.api.ComparatorFactory 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.api;
import java.util.Comparator;
import com.browseengine.bobo.util.BigSegmentedArray;
import com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator;
/**
* Comparator for custom sorting a facet value
* @author jwang
*/
public interface ComparatorFactory {
/**
* Providers a Comparator from field values and counts. This is called within a browse.
* @param fieldValueAccessor accessor for field values
* @param counts hit counts
* @return Comparator instance
*/
IntComparator newComparator(FieldValueAccessor fieldValueAccessor, BigSegmentedArray counts);
/**
* Providers a Comparator. This is called when doing a merge across browses.
* @return Comparator instance
*/
Comparator newComparator();
}