AnsweredAssumed Answered

setting max search results

Question asked by roth on Jul 24, 2007
Latest reply on Jul 25, 2007 by derek
How can I set the search limit for a query? I want to return all results, as shown in the code below:

        SearchService searchService = serviceRegistry.getSearchService();
        StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");

        SearchParameters sp = new SearchParameters();
        sp.addStore(storeRef);
        sp.setLanguage(SearchService.LANGUAGE_LUCENE);
        sp.setQuery("TYPE:\"" + type + "\"");
        sp.setLimitBy(LimitBy.UN*LIMI*TED); // the *-signs are a workaround for the spam filter
        results = searchService.query(sp);

However, this does work, the result set maximum is always 1000 results.
Setting the search-max-results limit to -1 in web-client-config.xml or a custom version does not work either.

Outcomes