Endeca Select feature aka set Selection - Controlling Endeca Record Values

The Select feature allows you to select specific keys (Endeca properties and/or dimensions) from the data so that only a subset of values will be transferred for Endeca records in a query result set.

This functionality prevents the transferring of unneeded properties and dimension values when they will not be used by the front-end Web application.

It therefore makes the application more efficient because the unneeded data does not take up network bandwidth and memory on the application server.

There are two possible scenarios:
1)  If you are making independent Endeca queries then you can use below API:

// Create a query
ENEQuery usq = new UrlENEQuery(request.getQueryString(),"UTF-8");
// Create an empty selection list
FieldList fieldList = new FieldList();
// Add an Endeca property to the list
fieldList .addField("P_DisplayName");
// Add an Endeca dimension to the list
fieldList .addField("P_RepositroyId");
// Add the selection list to the query
usq.setSelection(fieldList );
// Make the MDEX Engine query
ENEQueryResults qr = nec.query(usq);

2)If you are using ATG-Endeca integration then use below component and add only required fields.
 /atg/endeca/assembler/cartridge/handler/config/ResultsListConfig.properties
 fieldNames=\
  P_DisplayName,\
  P_RepositroyId


No comments:

Post a Comment