[TR-251] ResultSet implementation should know how to sort themselves Created: 16/Jan/10  Updated: 04/Apr/14  Resolved: 16/Aug/11

Status: Resolved
Project: Terrier Core
Component/s: None
Affects Version/s: None
Fix Version/s: 3.6

Type: Improvement Priority: Major
Reporter: Craig Macdonald Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None


 Description   
We now have various implementations of ResultSet. These various implementations should know how to sort themselves (if possible), instead of various code spread around for sorting them.

 Comments   
Comment by Craig Macdonald [ 17/Feb/11 ]

Tagging for 4.0. Major API change.

Comment by Craig Macdonald [ 15/Jul/11 ]

I have implemented an initial version of this. The ResultSet interface is modified as follows:

/** Sorts all documents in this resultset by descending score */
void sort();

/** Sorts the top <tt>topDocs</tt> document in this resultset be first.
 * The order of the remaining documents is undefined.
 * @param topDocs number of documents to top-rank
 */
void sort(int topDocs);
Comment by Craig Macdonald [ 16/Aug/11 ]

Committed revision 3561.

Comment by Craig Macdonald [ 25/Jul/12 ]

Tagging for 3.6

Generated at Tue Dec 12 09:55:54 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.