lib/solrizer/fedora/solrizer.rb in solrizer-fedora-1.0.1 vs lib/solrizer/fedora/solrizer.rb in solrizer-fedora-1.0.2

- old
+ new

@@ -32,11 +32,11 @@ end # # This method solrizes the given Fedora object's full-text and facets into the search index # - def solrize( obj ) + def solrize( obj, opts={} ) # retrieve the Fedora object based on the given unique id begin start = Time.now @@ -69,14 +69,16 @@ logger.debug "completed. Duration: #{index_elapsed} ." rescue Exception => e - p "SOLRIZER unable to index #{obj}. Failed with #{e.inspect}" - - - end #begin - + if opts[:suppress_errors] + logger.debug "SOLRIZER unable to index #{obj}. Failed with #{e.inspect}" + else + raise e + end + end #begin + end # # This method retrieves a comprehensive list of all the unique identifiers in Fedora and # solrizes each object's full-text and facets into the search index \ No newline at end of file