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

com.browseengine.bobo.facets.range.SimpleDataCacheBuilder 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.facets.range;

import com.browseengine.bobo.api.BoboSegmentReader;
import com.browseengine.bobo.facets.data.FacetDataCache;
import com.browseengine.bobo.facets.filter.AdaptiveFacetFilter.FacetDataCacheBuilder;

public class SimpleDataCacheBuilder implements FacetDataCacheBuilder {
  private final String name;
  private final String indexFieldName;

  public SimpleDataCacheBuilder(String name, String indexFieldName) {
    this.name = name;
    this.indexFieldName = indexFieldName;
  }

  @Override
  public FacetDataCache build(BoboSegmentReader reader) {
    return (FacetDataCache) reader.getFacetData(name);
  }

  @Override
  public String getName() {
    return name;
  }

  @Override
  public String getIndexFieldName() {
    return indexFieldName;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy