-
Notifications
You must be signed in to change notification settings - Fork 42
Gaston Gonzalez edited this page Apr 7, 2016
·
6 revisions
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 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.
- 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. - We make a curl request to the AEM servlet and save the JSON response as a file.
- 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.