As you know ICN default is 200 items per page and I have couple of Content Navigator searches
One has a criteria that brings back < 200 results.
Other one has a criteria that brings back >200 results.
I was able to sort the results based on the column I wanted after executing these searches individually, but what I have observed is, when the results are < 200 the sorting is happening on the client side and where as if the results are >200, an extra parameter is set in the request called "order_by" and entire search is performed again by the service layer based on the column I pick to sort with, which means the sorting is actually happening on the server side this time.
Is there a parameter or configuration that I can look at so that I can restrict the sorting to only client side, may be ?
Here comes the reason why I wanted to know the answer for this question, I did write a response filter for /p8/search and I am retrieving annotations of each document in the search results and adding a new column called "Annotation" in the results list. this works great and I am able to sort the list with annotation text column as long as my search has < 200 items. But if I do the search,the matching results are > 200 and I am trying to sort based on the Custom Annotations column that I added, it is bombing, because the request has a parameter called order_by=Annoations and Annotations is not a direct property on the Document Object that I can sort with when I am executing the search.
Any ideas on how to get around this issue?
Answer by Gabriel Garcia (1383) | Jul 26, 2017 at 10:54 PM
In order to sort on the client, you need to have all the search results in hand; otherwise, you'd be sorting only the first page (200 items) and never getting the rest of the search results. To get all the results in one go, you need to take paging out of the picture by setting pageSize to 0 on the SearchTemplate object that you are running. You can do this using a plug-in as explained here. The basic idea is to extend the SearchBuilder and SearchForm widget (this is the form used when you open a search) to set the pageSize of the search template just before it runs. In your case, you'll probably want to check if the search template includes the "Annotation" property before setting the page size. This way you don't remove paging from all searches. Keep in mind that you may experience poor performance if your search returns a ton of items and you don't use paging.
Answer by kiran.aithagani (329) | Jul 27, 2017 at 11:20 AM
Thank you for understanding the problem, I appreciate your thought on checking the order_by parameter name and increasing the pageSize if the value is Annotation, it may give the functionality what we are looking for but performance is utmost important thing for us.
I might have to think about presenting annotations differently in the Results grid, instead of adding a new column which is the root cause.
Do you have any idea on how to add a tree structure to one of the existing columns of the grid, obviously I didn't do much research on the decorator yet, but if you have any insight into it please share, If I can do a tree structure instead of a new column in the grid for Annotation data, that would potentially avoid this problem.
Answer by mbrees86 (16) | Dec 13, 2018 at 12:07 PM
Hi this isn't so much an answer as a question, but this is very close to what I'm looking for. Does this also apply to when a folder is open?
What we are seeing is a folder has more than 200 results and our response filter that we use to sort by date, isn't ever getting more than 200 results.
Sorry for hijacking this post but it's so close to what I'm looking for. Thanks!
IBM Content Navigator custom step processor invalid security token 2 Answers
How to set mandatory fields in Search tab of Content Navigator 2 Answers
Does Content search is supported by IBM Content Navigator for Microsoft Office or not? 2 Answers
How to merge multiple annotations to a document? 2 Answers
ICN Search Templates using both AND/OR conditions? 2 Answers