You can use the single-argument version of the ERecSortKey constructor to create a new relevance rank key that specifies the Endeca.stratify module. After adding the ERecSortKey object to an ERecSortKeyList, you can set it in the query with the Java ENEQuery.setNavActiveSortKeys() and the .NET ENEQuery.SetNavActiveSortKeys methods in the Presentation API.

The following Java sample code shows now to use these methods:

String stratKey = "Endeca.stratify(collection()/record[P_Region="Spain"],*)";
ERecSortKey stratSort = new ERecSortKey(stratKey);
ERecSortKeyList stratList = new ERecSortKeyList();
stratList.add(0, stratSort);
usq.setNavActiveSortKeys(stratList);


Copyright © Legal Notices