Endeca Results List cartridge displays search and navigation results to site users. You can configure it to boost or bury selected records using experience manager.
Suppose Business wants to Boost all record based on following criteria
Endeca OOTB functionality allow business to select only one condition to select boost/bury records in Results List Cartridge. Results list Boost and Bury editor does not allow to put all above four rules to display records out of the box.
We can leverage the Results list cartridge and customize to support multiple boost and bury condition. Stratify module is used as part of sorting parameter in ENE query to support boost/bury algorithm.
Here is how custom cartridge would look like
Here is code snippet that needs to used in ResultsList Handler to capture Boost list
for(XmlContentItem contentItem : contentItems){
if(contentItem!=null){
List<CollectionFilter> collectionFilters = (List<CollectionFilter>)contentItem.get("boostStrata");
if (collectionFilters != null)
{
List<String> listFIlters = new ArrayList<>();
boolean propFilterStatus = false;
for (Filter boostFilter : collectionFilters)
{
buf.append(EQLUtil.toEQLString(boostFilter));
buf.append(",");
if(boostFilter instanceof CollectionFilter){
CollectionFilter collectionFilter = (CollectionFilter)boostFilter;
Filter innerFilter = collectionFilter.getInnerFilter();
if(innerFilter instanceof PropertyFilter){
PropertyFilter propFilter = (PropertyFilter)innerFilter;
listFIlters.add(propFilter.getName()+":"+propFilter.getValue());
propFilterStatus = true;
}
if(innerFilter instanceof AndFilter){
AndFilter andFilter = (AndFilter)innerFilter;
List<Filter> operands = andFilter.getOperands();
for(Filter filter : operands){
if(filter instanceof DimensionFilter){
DimensionFilter dimFIlter = (DimensionFilter)filter;
listFIlters.add(dimFIlter.getDvalId());
}
}
}
}
}
Same logic needs to be calculated for bury Strata as well and needs to append along with Ns Parameter in the Endeca query to support multiple boost and bury scenario.
Suppose Business wants to Boost all record based on following criteria
- Boost few records based on defined product id key
- Show all records within price range between 10-25$ with sale products first
- Show all records within price range between 10-25$ with Clearance Products after rule 1
- Remaining records
Endeca OOTB functionality allow business to select only one condition to select boost/bury records in Results List Cartridge. Results list Boost and Bury editor does not allow to put all above four rules to display records out of the box.
We can leverage the Results list cartridge and customize to support multiple boost and bury condition. Stratify module is used as part of sorting parameter in ENE query to support boost/bury algorithm.
Here is how custom cartridge would look like

Here is code snippet that needs to used in ResultsList Handler to capture Boost list
for(XmlContentItem contentItem : contentItems){
if(contentItem!=null){
List<CollectionFilter> collectionFilters = (List<CollectionFilter>)contentItem.get("boostStrata");
if (collectionFilters != null)
{
List<String> listFIlters = new ArrayList<>();
boolean propFilterStatus = false;
for (Filter boostFilter : collectionFilters)
{
buf.append(EQLUtil.toEQLString(boostFilter));
buf.append(",");
if(boostFilter instanceof CollectionFilter){
CollectionFilter collectionFilter = (CollectionFilter)boostFilter;
Filter innerFilter = collectionFilter.getInnerFilter();
if(innerFilter instanceof PropertyFilter){
PropertyFilter propFilter = (PropertyFilter)innerFilter;
listFIlters.add(propFilter.getName()+":"+propFilter.getValue());
propFilterStatus = true;
}
if(innerFilter instanceof AndFilter){
AndFilter andFilter = (AndFilter)innerFilter;
List<Filter> operands = andFilter.getOperands();
for(Filter filter : operands){
if(filter instanceof DimensionFilter){
DimensionFilter dimFIlter = (DimensionFilter)filter;
listFIlters.add(dimFIlter.getDvalId());
}
}
}
}
}
Same logic needs to be calculated for bury Strata as well and needs to append along with Ns Parameter in the Endeca query to support multiple boost and bury scenario.
No comments
Post a Comment
Note: Only a member of this blog may post a comment.