Record queries can use the stratify relevance ranking module for boosting or burying records.
The stratify relevance ranking module can be specified in record search options, via the Ntx URL query parameter or the ERecSearch class.
Ntx=rel+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.
N=0&Ntx=mode+matchall+rel+stratify(collection()/record[P_Region="Tuscany" and P_Score>98],*) &Ntk=P_WineType&Ntt=red
The results will boost red wine records that are from Tuscany and have a rating score of 98 or greater. These records are placed in the highest stratum and all other records are placed in the unmatched stratum.
You can use the three-argument version of the ERecSearch constructor to create a record search query. The third argument can specify the use of the stratify module. The ERecSearch class is available in both the Java and .NET versions of the Presentation API.
// Create query ENEQuery usq = new UrlENEQuery(request.getQueryString(), "UTF-8"); // Create a record search query for red wines in the P_WineType property // and boost records from the Tuscany region String key = "P_WineType"; String term = "red"; String opt = "Ntx=rel+stratify(collection()/record[P_Region="Tuscany"],*)"; // Use the 3-argument version of the ERecSearch constructor ERecSearch eSearch = new ERecSearch(key, term, opt); // Add the search to the ENEQuery ERecSearchList eList = new ERecSearchList(); eList.add(0, eSearch); usq.setNavERecSearches(eList); ... // Make ENE request ENEQueryResults qr = nec.query(usq);