Class: Valkyrie::Persistence::Solr::ModelConverter::StringPropertyValue
- Inherits:
-
ValueMapper
- Object
- ValueMapper
- Valkyrie::Persistence::Solr::ModelConverter::StringPropertyValue
- Defined in:
- lib/valkyrie/persistence/solr/model_converter.rb
Overview
Handles casting strings.
Instance Attribute Summary
Attributes inherited from ValueMapper
Class Method Summary collapse
-
.handles?(value) ⇒ Boolean
Determines whether or not a Property value is a String.
Instance Method Summary collapse
-
#fields ⇒ Array<Symbol>
Generates the Solr fields used during the indexing String are normally indexed using the following: - stored text - stored english text - stored single string - multivalued string - stored multivalued text - stored multivalued english text If the string is greater than 1000 characters in length, it is only indexed as a stored multivalued text.
-
#result ⇒ SolrRow
Constructs a SolrRow object with the String values and Solr field settings.
Methods inherited from ValueMapper
Constructor Details
This class inherits a constructor from Valkyrie::ValueMapper
Class Method Details
.handles?(value) ⇒ Boolean
Determines whether or not a Property value is a String
402 403 404 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 402 def self.handles?(value) value.is_a?(Property) && value.value.is_a?(String) end |
Instance Method Details
#fields ⇒ Array<Symbol>
Generates the Solr fields used during the indexing String are normally indexed using the following:
- stored text
- stored english text
- stored single string
- multivalued string
- stored multivalued text
- stored multivalued english text
If the string is greater than 1000 characters in length, it is only indexed as a stored multivalued text
424 425 426 427 428 429 430 |
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 424 def fields if value.value.length > Valkyrie.config.index_tsim_only_threshold [:tsim] else [:tsim, :ssim, :tesim, :tsi, :ssi, :tesi] end end |