Class: Solr::Query::Request::OrFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/solr/query/request/or_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*filters) ⇒ OrFilter

Returns a new instance of OrFilter.



7
8
9
# File 'lib/solr/query/request/or_filter.rb', line 7

def initialize(*filters)
  @filters = filters
end

Instance Attribute Details

#filtersObject (readonly)

Returns the value of attribute filters.



5
6
7
# File 'lib/solr/query/request/or_filter.rb', line 5

def filters
  @filters
end

Instance Method Details

#to_solr_sObject



11
12
13
14
# File 'lib/solr/query/request/or_filter.rb', line 11

def to_solr_s
  subexpressions = @filters.map(&:to_solr_s)
  "(#{subexpressions.join(' OR ')})"
end