Class: Surfliner::MetadataConsumer::Solr::IndexHandler
- Inherits:
-
MessageHandler
- Object
- MessageHandler
- Surfliner::MetadataConsumer::Solr::IndexHandler
- Defined in:
- lib/surfliner/metadata_consumer/solr/index_handler.rb
Overview
Message handler that indexes resources into Solr.
Constant Summary collapse
- SOLR_ATTRIBUTES =
Attributes for the Solr "add" command; see https://cwiki.apache.org/confluence/display/solr/UpdateXmlMessages#UpdateXmlMessages-Optionalattributesfor%22add%22
{commitWithin: 10}.freeze
Instance Attribute Summary
Attributes inherited from MessageHandler
Instance Method Summary collapse
-
#handle ⇒ Object
Retrieves the resource specified in the message from Superskunk, converts it to a Solr document, and adds it to Solr.
Methods inherited from MessageHandler
handle, handler_for, #initialize, #solr_connection
Constructor Details
This class inherits a constructor from Surfliner::MetadataConsumer::Solr::MessageHandler
Instance Method Details
#handle ⇒ Object
Retrieves the resource specified in the message from Superskunk, converts it to a Solr document, and adds it to Solr.
19 20 21 |
# File 'lib/surfliner/metadata_consumer/solr/index_handler.rb', line 19 def handle index(build_document(SuperskunkClient.get(payload.resource_url))) end |