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:

  1. Export the application to which you want to add a keyword group.

  2. In the destination directory, navigate to \config\import\redirects\ and copy the Default folder.

  3. Paste the copied folder into \config\import\redirects\.

    For example, \config\import\redirects\Default-Copy.

  4. Rename the copied folder with the name of your new redirect group.

    For example, \config\import\redirects\DiscoverCameraGrp.

  5. In the new redirect group folder, change the name of the _Default.json to _.json.

  6. 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 the enableStemming value is appropriate for the keyword redirect group. You do not need to enter redirects 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"]}
                }
            }
        ]
    }
    
  7. 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\

  8. 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>
  9. Import the content with the new keyword group updates.


Copyright © Legal Notices