Class: Valkyrie::Persistence::Solr::ModelConverter::NestedObjectValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ModelConverter::NestedObjectValue
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Casts nested resources into a JSON string in solr.
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not a Property value is a Hash.
Instance Method Summary collapse
-
#result ⇒ SolrRow
Constructs a SolrRow object for a Property with a Hash value This is indexed as a stored multivalued text.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
Instance Method Details
#result ⇒ SolrRow
Note:
this prepends the string “serialized-” to the value indexed in Solr
Constructs a SolrRow object for a Property with a Hash value This is indexed as a stored multivalued text
244 245 246 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 244 def result SolrRow.new(key: value.key, fields: ["tsim"], values: ["serialized-#{value.value.to_json}"]) end |