class SearchSolrTools::Helpers::FacetConfiguration
Singleton configuration class to get and parse the binning configuration from the catalog services endpoint
Public Class Methods
get_facet_bin(facet_name)
click to toggle source
# File lib/search_solr_tools/helpers/facet_configuration.rb, line 16 def self.get_facet_bin(facet_name) @bin_configuration.select { |x| x['facet_name'] == facet_name }.sort_by! { |x| x['order_value'] } end
import_bin_configuration(env)
click to toggle source
# File lib/search_solr_tools/helpers/facet_configuration.rb, line 12 def self.import_bin_configuration(env) @bin_configuration = JSON.parse(RestClient.get("#{SolrEnvironments[env][:nsidc_dataset_metadata_url]}binConfiguration")) if @bin_configuration.nil? end