This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The SearchRequest Class should expose the values from CategoryResult.MAX_RESULTS and/or *.ALL_MAX_RESULTS to optimize queries for the SearchProvider. Sometimes it would be useful to know the real search result limits to prepare queries (e.g. database select optimizations, like the FIRST or ROWS clause, JDBC-setFetchSize, ...). Example: public class PersonNameSearch implements SearchProvider { @Override public void evaluate(SearchRequest request, SearchResponse response) { String req = request.getText(); int limit = request.getResultLimit(); // proposal ... PreparedStatement stmt = ... stmt.setFetchSize (limit);
Created attachment 147414 [details] Proposed Patch Please check the attached patch. If the changes seem ok to you, I'll add unit tests and start an API review. Thank you for reporting.