The record boost and bury feature can used to sort record results for queries.
The Endeca.stratify relevance ranking module can be specified in record search options, via the Ns URL query parameter or the API methods.
Ns=Endeca.stratify(EQLexpressions)where EQLexpressions is one or more of the EQL expressions documented in the "Using the Endeca Query Language" in the Advanced Development Guide. Note that you must prepend the Endeca prefix to the module name.
N=0&Ns=Endeca.stratify(collection()/record[P_Region="Spain"],*)
N=0&Ns=Endeca.stratify(collection()/record[P_Region="Spain" and P_Score>90],*)
The query results will boost Spanish wines that have a rating score of 91 or greater. These records are placed in the highest stratum and all other records are placed in the unmatched stratum.
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.
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);