linkedin/cleo — pull request #4 by stewi2 (2012-05-23 05:48:37+00:00)
Title: MultiTypeahead should use a SortedCollector instead of SimpleCollector

Perhaps because I'm combining a set of WeightedNetworkTypeahead instances via a MultiTypeahead, the results returned when using e.g. maxResults=10 didn't match the top 10 results shown when returning all results. This was because MultiTypeahead used a SimpleCollector and simply stopped collecting after N results, without using a heap to collect the top N. This commit switches the default collector used by MultiTypeahead to a SortedCollector, which seems to me the more logical choice and fixed my ranking issue.