Search code examples
content-management-systemibm-content-navigator

Response Filter dosen't work on search result sets larger than 50


We are having an issue with ICN Response filter. What we are doing is

Implementing a search template Modifying the response JSON Object to include extra column Add extra rows to the original response based on some condition

It works perfectly fine when response size from a search result is small i.e. if we are getting say 30 rows from the original response and to that we perform the modification as listed above. But when the original response size is, say 50+, then modification to the response as above doesn't have any effect. It returns the response to UI without getting modified.

Regards, Manju


Solution

  • When you perform a search in ICN, it will only return the first n results (your's sounds like it is set to 50). In order for the remaining fetches to work through your response filter you will need to add another "Filtered Service" "/p8/continueQuery"

    We currently use 4 different Filtered Services in our Search Response Filters:

    private static final String[] filter = new String[] { "/p8/search", "/p8/continueQuery", 
    "/p8/getStepAttachmentItems", "/p8/getDocumentVersions" };
    
    @Override
    public String[] getFilteredServices() {
        return filter;
    }