Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Sorting Search Results in ICN

3100006SBM gravatar image
Question by kiran.aithagani  (329) | Jul 26, 2017 at 04:52 PM icnfilenetcontent-navigator

As you know ICN default is 200 items per page and I have couple of Content Navigator searches

  1. One has a criteria that brings back < 200 results.

  2. 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?

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

3 answers

  • Sort: 
270002EBD6 gravatar image

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.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
3100006SBM gravatar image

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.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
5079YR52G8 gravatar image

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!

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

139 people are following this question.

Answers

Answers & comments

Related questions

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

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges