I am experiencing a problem in ICN 2.0.1 working with a CM 126.96.36.199 repository.
I'd also like to say that I've tried doing this same thing on ICN 2.0.2, but I get the same behavior there as well.
Please forgive the verbosity of this post, but the problem is quite intricate to explain...
I have developed a response filter to limit the number of returned results based on customer criteria that cannot be implemented simply with an appropriate ACL.
Thus, what happens is:
1 - the user performs a search
2 - results are returned by ICN and processed by my response filter
3 - the response filter examines the results and removes the ones that do not match the customer's external criteria
4 - the filtered results are passed to the ICN interface and shown to the end user
If the overall query results, BEFORE the filter is applied, are less than 200, everything works fine.
If, however, the results are more than 200, the query allows for "continuation", and the troubles begin.
If I just filter results both for the cm/search and cm/continueQuery actions, I get a loop in the continuation, ICN will show the same (filtered) results over and over again.
I figured out that I also need to implement a REQUEST filter, changing the value of the "skip" and "itemsNeeded" parameters, because ICN will automatically populate those respectively with the number of shown (filtered) results, and the number of shown (filtered) results plus 20.
Thus, if the query returns 200 results, but my filter only shows 2, skip will automatically be set to 2, and itemsNeeded to 22. This makes the continuation work badly, and causes weird result loops to be shown.
What I did was then to keep track of the continuation "iterations", and set the values of "skip" and "itemsNeeded" appropriately (for example, for the first iterations, I set them respectively to 200 - 220, 400 - 420, 600 - 620, etc...).
This was a step forward, results now don't loop. However, it still doesn't work 100% well. What happens now is that the filtered results are shown, but a number of "sliding rectangle" wait animations are shown below the filtered results. Despite the animations, nothing is being done by ICN, except if I slide down to the last row of animations, in which case the next "continuation" of the query is triggered (producing more sliding rectangles animations).
It seems that, since the animations fill the results list in the interface, the continuation is suspended.
What I was expecting, instead, was that the queries would continue to the end of the overall result set.
Am I making a mistake in the interpretation and setting of the "skip" and "itemsNeeded" parameters? How can I avoid ICN from filling up the list with "wait" animations, and instead continue querying to the end of the results?
I would really appreciate any help on this, as it is starting to become a critical issue...
Thanks in advance,