Skip to content
Gaston Gonzalez edited this page Apr 7, 2016 · 6 revisions

Q. How does the update request handler work?

Update Handlers are a Solr concept. You can read about them here. The Geometrixx Media Sample provides two methods for indexing, one which uses the JSON Update Request Handler. We gave a talk, Integrating Open Source Search with CQ/AEM, at adaptTo() 2014 where we describe this indexing approach (there are several). See Slides 8-10. Basically, this approach is used to perform on-demand, full indexing.

Here’s how it works.

  1. We created an AEM servlet (/apps/geometrixx-media/solr/updatehandler) that produces a JSON response that conforms to Solr’s JSON update request handler format. This returns one large JSON response with all the Geometrixx Media Articles.
  2. We make a curl request to the AEM servlet and save the JSON response as a file.
  3. We make a curl request to Solr’s update request handler endpoint and stream the JSON file from step 2.

This process is encapsulated in the index-geometrixx-media-articles.sh script that is described in the README. For ongoing indexing, you can schedule this script to run via a UNIX cron job.

Clone this wiki locally