You configure site-based keyword redirects by creating keyword redirect groups. Oracle recommends copying the default redirect group and editing it as appropriate for your site.
Before you begin, verify that the template from which the search results pages were created has a redirect group property.
Follow these steps:
Export the application to which you want to add a keyword group.
In the destination directory, navigate to
\config\import\redirects\
and copy theDefault
folder.Paste the copied folder into \config\import\redirects\.
For example,
\config\import\redirects\Default-Copy
.Rename the copied folder with the name of your new redirect group.
For example,
\config\import\redirects\DiscoverCameraGrp
.In the new redirect group folder, change the name of the
_Default.json
to_.json
.Use a text editor to update the site-based keyword redirects group JSON with unique information appropriate for your new site. At a minimum, enter a
displayName
value and verify that theenableStemming
value is appropriate for the keyword redirect group. You do not need to enterredirects
values since business users can use the Workbench interface for that activity.Be sure that the
displayName
property that you enter is meaningful to the business users that add keyword redirects and manage permissions in Workbench. You might want to choose a name that a business user can easily associate with a specific site.In the following example, the redirect group has been updated with a unique display name.
{ "ecr:type": "redirect-group", "displayName": "Discover Cameras", "enableStemming": true, "redirects": [ { "matchmode": "MATCHEXACT", "url": "/support", "searchTerms": "help" "searchTermExpansions": { "0": {"help": ["help"]} } }, { "matchmode": "MATCHEXACT", "url": "/contact-us", "searchTerms": "locations" "searchTermExpansions": { "0": {"locations": ["location"]} } } { "matchmode": "MATCHEXACT", "url": "/shipping", "searchTerms": "delivery" "searchTermExpansions": { "0": {"delivery": ["delivery"]} } } ] }
Navigate to the
context.xml
file for the relevant search results page for the site.For example, the
context.xml
file for Discover Cameras whose search results can be rendered by a browse page would be stored at:pages\DiscoverCameras\browse\
Use a text editor to update the
context.xml
file with a unique site-based keyword redirect group appropriate for your new site. The group name must match the folder name where the redirects JSON is stored.For example, for Discover Cameras, the redirects group string has the following name:
</Property> <Property name="redirectGroup"> <String>/redirects/DiscoverCamerasGrp</String> </Property>
Import the content with the new keyword group updates.
Navigate to the
<app_dir>
\control\<app_dir>
/control/From the command line, import the updated content by entering the following commands:
For example:
runcommand.bat IFCR importContent pages c:\myexports\Discover\config\import\pages
runcommand.bat IFCR importContent redirects c:\myexports\Discover\config\import\redirects
and
runcommand.bat IFCR importContent templates c:\myexports\Discover\config\import\templates