All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.browseengine.bobo.api.ComparatorFactory Maven / Gradle / Ivy

Go to download

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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy