Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Sorting Search Results
beck
We have existing code that uses the SearchDocuments() on the INRTSession object to return documents matching searching criteria. Often the result set is larger than the value of the MaxRowsForSearch property.
I'm looking for a way to sort the results that are sent back even when the results exceed the value of MaxRowsForSearch. I am willing to the new API from version 8. I read section "Sorting Search Results" from the "What's New in iManage.dll 8.0", but I'm not sure how that helps when using SearchDocuments().
To be clear, I know how to sort the results that are returned from SearchDocuments(). I am looking for a way to have the results sorted before they are return from the server. This makes a difference when the number of matching results exceeds the number of results returned.
Any suggestions would be appreciated.
--Beck
Find more posts tagged with
Comments
jny
You may only sort on the returned results as the sorting occurs off of a collection object. What is your current MaxRowsForSearch count? Have you already tried increasing it to greater than the default 512?
beck
Our goal is to return the most recent documents first even when the results exceed the search limit. Is there no way to achieve that either through the API or through some server side configuration? What order are documents currently returned in by default?
--Beck
jny
I believe it's sort by createdate, from earliest to latest. So, you may want to sort by latest to earlies implement our IManObjectSort Object to reverse the order after you get the results collection back from the Search method.
DaleN
There is a Server side "Metadata and Search Results Sorting" option available in WS 8.0 that is documented in the Administratr Reference Manual. Briefly though, to get the search results sorted by Edit Date on the server before they are returned to the client application go to the following registry key:
HKEY_LOCAL_MACHINE\Software\Interwoven\WorkSite\imDmsSvc\Databases\[ODBC Data Source Name]\
and add a DWORD value
Name: "Sort Order Mask"
Value: 2
As seen from the registry key, this is done on a database by database basis. I hope this helps!
Regards,
Dale
jny
Thanks Dale. I believe beck would like to sort the result set by CreateDate. Does this key apply to CreateDate as well as EditDate?
DaleN
The server side key just applies to the Edit Date. At this stage there are no server side options to force a sort based on Create Date.
Regards,
Dale
beck
Actually Edit Date is useful. I tried that setting and it does seem to work. Thanks.
Only one problem. What happens when the search spans multiple databases? It appears to return all the results for one database before results for the next one. Is that correct? Can that be changed?
--Beck