module Elasticsearch::FacetedSearch::FacetBase::ClassMethods
self <<
Public Instance Methods
facet(name, field, type, title)
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 44 def facet(name, field, type, title) @facets ||= {} @facets.merge!({ name.to_sym => { field: field, type: type, title: title } }) end
facet_exclusive_or(name, field, title = nil)
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 67 def facet_exclusive_or(name, field, title = nil) facet(name, field, 'exclusive_or', title) end
facet_multivalue(name, field, title = nil)
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 55 def facet_multivalue(name, field, title = nil) facet(name, field, 'multivalue', title) end
facet_multivalue_and(name, field, title = nil)
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 59 def facet_multivalue_and(name, field, title = nil) facet(name, field, 'multivalue_and', title) end
facet_multivalue_or(name, field, title = nil)
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 63 def facet_multivalue_or(name, field, title = nil) facet(name, field, 'multivalue_or', title) end
facets()
click to toggle source
# File lib/elasticsearch/faceted_search/facet_base.rb, line 40 def facets @facets || [] end