Class: Solr::Query::Request::FieldList
- Inherits:
-
Object
- Object
- Solr::Query::Request::FieldList
- Includes:
- Support::SchemaHelper
- Defined in:
- lib/solr/query/request/field_list.rb
Constant Summary collapse
- MANDATORY_FIELDS =
%i[id].freeze
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(fields: []) ⇒ FieldList
constructor
A new instance of FieldList.
- #to_solr_s ⇒ Object
Methods included from Support::SchemaHelper
Constructor Details
#initialize(fields: []) ⇒ FieldList
Returns a new instance of FieldList.
11 12 13 |
# File 'lib/solr/query/request/field_list.rb', line 11 def initialize(fields: []) @fields = fields end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
9 10 11 |
# File 'lib/solr/query/request/field_list.rb', line 9 def fields @fields end |
Instance Method Details
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/solr/query/request/field_list.rb', line 15 def empty? fields.empty? end |
#to_solr_s ⇒ Object
19 20 21 |
# File 'lib/solr/query/request/field_list.rb', line 19 def to_solr_s (MANDATORY_FIELDS + fields.map(&method(:solarize_field))).uniq.join(',') end |