X

Best Practices from Oracle Development's A‑Team

WebCenter Sites Demo Integration with Endeca Guided Search

Michael Sullivan
Principal Cloud Solutions Architect

In early 2014, WebCenter Sites engineering produced a demo Sites + Endeca Guided Search integration for the A-Team to review. The use case for such a demo is quite compelling: pretty much any large Sites-authored website can benefit from Guided Search technology. And while one “could” implement a guided search mechanism in WebCenter Sites it would require a lot of work as there are no OOTB features of the product to facilitate it. Further, such a bespoke solution would likely not have all the robust tools that come OOTB with Endeca Guided Search. As such, the concept of Sites + Endeca integration appeals very much to the A-Team. We think it to be a natural integration which should have lots of broad market appeal for existing and future Sites customers.

The final goal of the demo:

The following screenshot shows a WebCenter Sites Template rendering a Guided Search payload provided by Endeca of WCS-authored content indexed in the Endeca MDEX.

screenshot sites+endeca

Requirements Specific to this Demo

Required Endeca Software

The following Endeca software must be installed prior to installing the integration:

  • Endeca MDEX Engine 6.3.0 (V33381-01 or V33387-01)
  • Endeca Platform Services 6.1.3 (V33317-01 or V33316-01)
  • Tools and Frameworks with Experience Manager 3.1.0 (V33380-01 or V33386-01)
  • Content Acquisition System 3.0.2 (V31463-01 or V31482-01)

NOTE: As many of you will notice, the above does not represent the latest versions of the Commerce product.

Required WebCenter Sites Software

The WebCenter Sites/Endeca Integration has been tested on Oracle WebCenter Sites 11gR1 (11.1.1.6.0). This is available on the Oracle Software Delivery Cloud at https://edelivery.oracle.com.

NOTE: While it has not been tested, the demo should work with WebCenter Sites v11.1.1.8.

The basic pattern suggested by this Demo is as follows:

  • Specific Endeca jars are deployed to the Sites context
  • Some custom elements were created to update the WCS event framework
  • A property file describes the mapping between Sites’ asset attributes and the dimensions needed for Guided Search
  • Sites-authored web-referenceable assets are injected into a CAS Record Store upon save
  • A batch re-indexer can be scripted to run every “n” minutes to update the MDEX
  • The sample application uses the preconfigured “/services/guidedsearch” service to obtain information from the Endeca index
  • Sites Templates, having direct access to the Endeca core classes and therefore to the Endeca Guided Search POJO, can access the payload directly and then convert those values into renderable content
  • All the custom pieces needed for the demo were packaged up in a single zip archive named sites-endeca-integration.zip. Not included in the archive are any productized code from either Sites nor Endeca. Thus the expectation of this demo was for you to obtain the Endeca jars yourself and deploy them as per the documentation (see table below)

So while the idea of an integration between Sites and Endeca is compelling, as always the “devil is in the details”. To wit: there are a few details missing from the demo that we feel need to be addressed before such a solution could be made public. The two missing features which we feel are critical are:

  • The integration with Endeca should be via REST over HTTP (as opposed to deploying Endeca jars directly in the Sites classpath)
  • The MDEX must support both Global Search of Sites-authored webpages as well as Guided Search of Sites-authored webreferenceable assets

NOTE: the two features above are described in detail in another A-Team paper entitled Three Patterns for Integrating WebCenter Sites with Oracle Commerce, which can be obtained from the A-Team Chronicles blog.

What is in the Demo sites-endeca-integration.zip archive?

The following table lists all the individual components of the demo that are included in the zip archive:

The following files create events in Sites
catalogs/ElementCatalog/OpenMarket/Xcelerate/Endeca/
catalogs/ElementCatalog/OpenMarket/Xcelerate/Endeca/IndexConfig.jsp
catalogs/ElementCatalog/OpenMarket/Xcelerate/Endeca/EnableEvent.jsp
catalogs/ElementCatalog/OpenMarket/Xcelerate/Endeca/Event.jsp
 
The following files are used to create new tables and also update existing tables with new records
catalogs/
catalogs/SystemLocaleString.html
catalogs/Endeca_Q.html
catalogs/EndecaQueues.html
catalogs/SiteCatalog.html
catalogs/ElementCatalog.html
catalogs/AssetListener_reg.html
catalogs/SystemEvents.html
The following file is the documentation:
docs/
docs/Sites-Endeca Integration.doc
 
The following file is the primary jar containing all the classes (shown exploded for your review)
lib/
lib/sites-endeca-integration.jar :
lib/sites-endeca-integration/com/fatwire/endeca/extensions/
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaAssetIdEventListener.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaIndexSource.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaAssetQueueIndexSourceUtil.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaConfig.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaIndexControlHandler.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaIndexSourceMetadata.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaProcessRunner.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaRecordFileWriter.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaRecordStoreWriter.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaRecordWriter.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaSearchEngine.class
lib/sites-endeca-integration/com/fatwire/endeca/extensions/EndecaTransientAssetQueue.class
lib/sites-endeca-integration/com/META-INF/
 
The following files define the Endeca pipeline, the testdata, and the sample sites
samples/application/config/pipeline/
samples/application/config/pipeline/partial_pipeline.epx
samples/application/control/
samples/application/control/load_partial_sites_integration_data.bat
samples/application/control/load_partial_sites_integration_data.sh
samples/application/test_data/
samples/application/test_data/baseline/rs_baseline_dimvals.xml
samples/application/test_data/baseline/rs_baseline_schema.xml
samples/application/test_data/baseline/rs_baseline_data.xml
samples/application/test_data/baseline/rs_baseline_prules.xml
samples/application/test_data/config_api_input/
samples/application/test_data/config_api_input/dimension_values.csv
samples/application/test_data/config_api_input/precedence_rules.csv
samples/application/test_data/config_api_input/schema.csv
samples/application/test_data/partial/
samples/application/test_data/partial/rs_partial_delete_all_data.xml
samples/application/test_data/partial/rs_partial_data.xml
samples/assembler_api/
samples/assembler_api/assembler_api_test.jsp
samples/FirstSiteII/
samples/FirstSiteII/FSIICommon_SideNav_ProductView.jsp
samples/FirstSiteII/FSIIProductDetailView.jsp
samples/FirstSiteII/FSIIProductSideNavView.jsp
samples/sites/classes/com/endeca/infront/refapp/navigation/
samples/sites/classes/com/endeca/infront/refapp/navigation/BasicActionPathProvider.class
samples/sites/classes/
samples/sites/classes/endecafieldnames.properties
samples/sites/
samples/sites/assembler-context.xml
samples/sites/assembler.properties
samples/sites/endeca-url-config.xml
samples/sites/perf-logging-config.xml
samples/sites/web.xml
samples/
samples/endeca-integration.ini

 

For those of you new to integrating Sites with Endeca, it might be worthwhile studying the code samples above for ideas about how you will implement your own integration. You can obtain the above-mentioned zip archive here: sites-endeca-integration. It should be noted that the A-Team does not approve of this solution for real-world customers nor does the A-Team support the included code. In fact we will go on the record here that deploying Endeca jars (or any productized jars for that matter) in the WebCenter Sites context is a bad practice for customers as it makes upgrading nearly impossible. Further, support is made complicated and problematic by doing so. Instead, this demo solution is provided to demonstrate the viability of integrating the two products and allow developers to inspect the solution for concepts to incorporate into their own projects.

A Final Word from our Sponsor:

Partially inspired by this demo, the A-Team release in August 2014 a technical white paper on the A-Team Chronicles blog: Three Patterns for Integrating WebCenter Sites with Oracle Commerce. As described in the paper, code is provided to support Pattern 1. Extending the supplied codebase to support Pattern 2 is currently left up to the reader.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content