-
Notifications
You must be signed in to change notification settings - Fork 42
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.
- 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.
AEM Solr Search does not provide an indexing framework as part of the core platform. However, it does provide a sample indexing implementation that works with the Geometrixx Media Site (refer to aemsolrsearch-geometrixx-media-sample bundle). This sample bundle uses a listener to provide real-time indexing. The listener is enabled by default, however, it can be disabled via an OSGi property. Simply set the listener.disabled property to true in the Felix Configuration console or create a run mode.
The core platform does not. However, the aemsolrsearch-geometrixx-media-sample bundle provides a sample servlet that serializes the AEM content Solr's JSON format which can be fetched by a script and posted to Solr. This script is approach is only recommended for very small sites. Larger sites should consider building a custom approach that walks the site's nodes and submits indexing requests in batches.