Manage Learn to apply best practices and optimize your operations.

Sorting search results

How to sort search results in ways other than the three options given: relevancy, oldest or newest.

You should understand that when returning search results, Domino allows three basic options: by relevancy, by oldest or by newest. It all depends on the &SearchOrder= value. A value of 1 (e.g., &SearchOrder=1) is by relevancy, SearchOrder=2 is by oldest and SearchOrder=3 is by newest. The problem is that the oldest and the newest is by age of the document since it was last modified. So how can you sort by some other field -- say, PublishDate?

Add a hidden column with the value PublishDate. Then sort it Ascending or Descending (your choice).

Next: When you submit your search query use &SortOrder=4 as part of the query and it will use that hidden column. The other SortOrder values mentioned still work, too.

Do you have comments on this tip? Let us know.

Dig Deeper on Domino Resources - Part 5

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...