Question

I'm working on a web application with Oracle ATG 10.1.2 and Endeca 3.1.1 (without Endeca Experience Manager), and am trying to get keyword redirect functionality to work.

Ultimately, what I'm trying to accomplish is to get access to the keyword redirect information returned from Endeca (if there was any) in my JSP layer, so I can redirect the user to the keyword redirect URL, and/or display that URL as part of the rendered page.

To get results from Endeca, we are using the /services/guidedsearch packaged service (as described in on p51 of the Assembler Application Developer's Guide (v3.1.1).

If I use my browser to directly access the raw Guided Search output from the Endeca MDEX server, I can see my guided search entry and URL in the endeca:redirect property in the returned XML. I can also see the guided search entry with no problem in the Endeca JSP Reference Application ("orange app").

However, when I use the ATG InvokeAssembler droplet to get results from Endeca, the endeca:redirect entry doesn't seem to be included in the response. The ContentItem map that gets returned only has the following keys:

@type, name, navigation, breadcrumbs, resultsList, searchAdjustments, zones, endeca:siteRootPath, endeca:contentPath

There's no endeca:redirect key like I can see in the raw /services/guidedsearch XML output.

Here's the relevant snippet of my JSP code:

<dsp:droplet name="/atg/endeca/assembler/droplet/InvokeAssembler">
  <dsp:param name="includePath" value="/services/guidedsearch" />  
  <dsp:oparam name="output">
    <dsp:getvalueof param="contentItem" var="contentItem" vartype="com.endeca.infront.assembler.ContentItem" />
  </dsp:oparam>
</dsp:droplet>

How can I access the keyword redirect information returned from Endeca?

Was it helpful?

Solution 2

According to Oracle Support doc 1530390.1, the problem is that in ATG 10.1.2, the InvokeAssembler droplet is internally coded to use an Endeca ContentInclude object (which doesn't support keyword redirects), instead of using RedirectAwareContentIncludeHandler (which does).

Per that knowledge document, Hotfix p16099140 can be requested from Oracle Support to address this.

OTHER TIPS

You could also develop your own RedirectAwareHandler and simply extract the redirect from the SupplementList.

public ContentItem process(ContentItem pContentItem) throws CartridgeHandlerException {
    ENEQueryResults executeMdexRequest = executeMdexRequest(mMdexRequest);
    Object redirectURL = null;
    if (executeMdexRequest.getNavigation() != null && executeMdexRequest.getNavigation().getSupplements() != null){
        SupplementList supplements =  executeMdexRequest.getNavigation().getSupplements();
        Supplement supplement = null;

        for (Object object : supplements) {
            if (object instanceof Supplement) {
                supplement = (Supplement) object;
                if (supplement.getProperties() != null) {
                    redirectURL = supplement.getProperties().get("DGraph.KeywordRedirectUrl");
                    if (redirectURL != null) {
                        break;
                    }
                }
            }
        }
    }

//And now do your redirect
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top