class Blacklight::Solr::Response::Facets::FacetField
represents a facet; which is a field and its values
Attributes
Public Class Methods
Source
# File lib/blacklight/solr/response/facets.rb, line 35 def initialize name, items, options = {} @name = name @items = items @options = options end
Public Instance Methods
Source
# File lib/blacklight/solr/response/facets.rb, line 73 def count? sort == 'count' end
Source
# File lib/blacklight/solr/response/facets.rb, line 61 def data @options[:data] || {} end
Source
# File lib/blacklight/solr/response/facets.rb, line 69 def index? sort == 'index' end
Source
# File lib/blacklight/solr/response/facets.rb, line 41 def limit @options[:limit] || solr_default_limit end
Source
# File lib/blacklight/solr/response/facets.rb, line 49 def offset @options[:offset] || solr_default_offset end
Source
# File lib/blacklight/solr/response/facets.rb, line 53 def prefix @options[:prefix] || solr_default_prefix end
Source
# File lib/blacklight/solr/response/facets.rb, line 65 def response @options[:response] end
Source
# File lib/blacklight/solr/response/facets.rb, line 45 def sort @options[:sort] || solr_default_sort end
Source
# File lib/blacklight/solr/response/facets.rb, line 57 def type @options[:type] || 'terms' end
Private Instance Methods
Source
# File lib/blacklight/solr/response/facets.rb, line 80 def solr_default_limit 100 end
Source
# File lib/blacklight/solr/response/facets.rb, line 94 def solr_default_offset 0 end
Source
# File lib/blacklight/solr/response/facets.rb, line 98 def solr_default_prefix nil end
Source
# File lib/blacklight/solr/response/facets.rb, line 85 def solr_default_sort if limit > 0 'count' else 'index' end end