Most of the time record filters, range filters are used as part of creating navigation request and fire a query to Endeca using cartridge handler. Endeca returns navigation object that contains record, dimensions and descriptors. Endeca provides Basic and SEO URL formatter to format endeca URL. Most of the clients use SEOUrlFormatter for live application.
Behavior : -
Endeca returns all appended parameters as well, that got added in navigation state builder, part of Guided navigation and breadcrumb URLs. Nr parameter starts visible in refinement menu URL.
Example :- /electronics/computers-tablets/computer-accessories/_/N-abcd?Nr=sku.inStock%3A1&Ns=product.startDate%7C1
Solution : -
Extend SeoUrlFormatter and override checkIgnoredParamList method. so that ignored parameter would not be sent over to front-end.
Sample Code below:-
public boolean checkIgnoredParamList(UrlParam urlParam) {
if ("Nf".equalsIgnoreCase(urlParam.getKey()) || "Nr".equalsIgnoreCase(urlParam.getKey()) || "_dyncharset".equalsIgnoreCase(urlParam.getKey())
|| "_D:siteScope".equalsIgnoreCase(urlParam.getKey()) || "siteScope".equalsIgnoreCase(urlParam.getKey()) || "_D:siteIds".equalsIgnoreCase(urlParam.getKey()) || "search".equalsIgnoreCase(urlParam.getKey())
|| "_DARGS".equalsIgnoreCase(urlParam.getKey())) {
return true;
}
return false;
}
Note: Any customization to SeoUrlFormmater needs to add into SEO URL generator classpath.
Click here to view How to Enable URL canonicalization
From Author
Was this post resolve the SEO issue?Provide your comments
No comments
Post a Comment
Note: Only a member of this blog may post a comment.