Setting the number of bulk records to return

By using members from the ENEQuery class, you can set the number of bulk-format records to be returned by the MDEX Engine.

When creating the navigation query, the application can specify the number of Endeca records or aggregated records that should be returned in a bulk format with these Java and .NET calls:
The MAX_BULK_ERECS_AVAILABLE constant can be used with either call to specify that all of the records that match the query should be exported; for example:
// Java example:
usq.setNavNumBulkERecs(MAX_BULK_ERECS_AVAILABLE);

// .NET example:
usq.NavNumBulkERecs = MAX_BULK_ERECS_AVAILABLE;
To find out how many records will be returned for a bulk-record navigation query, use these calls:

Note that all of the above calls are also available in the UrlENEQuery class.

The following examples set the maximum number of bulk-format records to 5,000 for a navigation query.

Java example

// Set MDEX Engine connection
ENEConnection nec = new HttpENEConnection(eneHost,enePort);
// Create a query
ENEQuery usq = new UrlENEQuery(request.getQueryString(),	"UTF-8");
// Specify the maximum number of records to be returned
usq.setNavNumBulkERecs(5000);
// Make the query to the MDEX Engine
ENEQueryResults qr = nec.query(usq);

.NET example

// Set Navigation Engine connection
HttpENEConnection nec = new HttpENEConnection(ENEHost, ENEPort);
// Create a query
String queryString = Request.Url.Query.Substring(1);
ENEQuery usq = new UrlENEQuery(queryString, "UTF-8");
// Specify the maximum number of records to be returned
usq.NavNumBulkERecs = 5000;
// Make the request to the Navigation Engine
ENEQueryResults qr = nec.Query(usq);