The GroupingApplicationRoutingStrategy class allows more flexible groupings of sites than SiteApplicationRoutingStrategy does. For example, with GroupingApplicationRoutingStrategy, you can have three sites handled by one EAC application and two other sites handled by a second EAC application. If a site has multiple languages, all records for the site are directed to the site’s EAC application, regardless of the language.

To use GroupingApplicationRoutingStrategy, set the ApplicationConfiguration component’s applicationRoutingStrategy property as follows:

applicationRoutingStrategy=\
  /atg/endeca/configuration/GroupingApplicationRoutingStrategy

Since this strategy may involve having multiple languages in a single EAC application, you need to set the ApplicationConfiguration component’s defaultLanguageForApplications property to the two-letter language code for the default language. For example:

defaultLanguageForApplications=fr

Note that you should set this property even if your data is in only one language.

The mapping of EAC applications to sites is done through the GroupingApplicationRoutingStrategy component itself, rather than the ApplicationConfiguration component. Therefore, you must set the keyToApplicationName properties of the ApplicationConfiguration component to null:

keyToApplicationName^=/Constants.null

Mapping of applications to sites is done through the applicationGroupingMap property of the GroupingApplicationRoutingStrategy component. This property is a Map where each key is the name of an EAC application and the corresponding value is a list of the site IDs of the sites to be routed to that application. The list is in the form of a string with the pipe character (|) used as the separator between site IDs. For example:

applicationGroupingMap=\
  footwearStores=shoeSiteUS|shoeSiteCanada,\
  apparelStores=clothesSiteUS|clothesSiteUK|clothesSiteCanada

Set the routingObjectAdapter property of the /atg/endeca/index/IndexingApplicationConfiguration component to specify the ContextRoutingObjectAdapter component to use:

routingObjectAdapter=\
  /atg/endeca/index/configuration/GroupingContextRoutingObjectAdapter

Set the routingObjectAdapter property of the /atg/endeca/assembler/AssemblerApplicationConfiguration component to specify the RequestRoutingObjectAdapter component to use:

routingObjectAdapter=\
  /atg/endeca/index/configuration/GroupingRequestRoutingObjectAdapter

To ensure that separate records are created for each EAC application, you need to add the MultipleSiteVariantProducer to the variantProducers property of each EndecaIndexingOutputConfig component. For example:

variantProducers+=/atg/search/repository/MultipleSiteVariantProducer

EndecaIndexingOutputConfig components are discussed in the next several chapters of this manual. For information about variant producers, including MultipleSiteVariantProducer, see the Using Variant Producerssection of the Customizing the Output Records chapter.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices