samvera-deprecated / solrizer

A lightweight, configurable tool for indexing metadata into solr.
Apache License 2.0
30 stars 13 forks source link

Updating .format_node_value to handle dates #13

Closed jeremyf closed 11 years ago

jeremyf commented 11 years ago

The Problem:

In working with Sufia 0.0.7, when I go to upload a file, I encounter the following exception:

undefined method `gsub' for Mon, 21 Jan 2013:Date

What appears to be the case is that the RDF Datastream declares the :date_uploaded field as type :date. Then, when calling #to_solr, the original solrizer is expecting to format strings, but ActiveFedora is passing a Date value for the :date_uploaded's value

One of these systems should handle this, and I believe Solrizer should properly transform values to their correct format.

jcoyne commented 11 years ago

@jeremyf this wasn't because you added index.type :date to the 'created' field.

carolyncole commented 11 years ago

I had that error yesterday. Tracked it to a local solr.yml file which I removed and all started working.

----- Original Message -----

@jeremyf this wasn't because you added index.type :date to the 'created' field.

— Reply to this email directly or view it on GitHub .

jcoyne commented 11 years ago

@jeremyf try removing config/solr_mappings.yml

jeremyf commented 11 years ago

@jcoyne It wasn't from adding index.type :date. It was happening on other files as well. I'm going to also attempt to remove the config/solr_mappings.yml