Skip to content

Commit

Permalink
Merge pull request #4 from stewi2/master
Browse files Browse the repository at this point in the history
MultiTypeahead should use a SortedCollector instead of SimpleCollector
  • Loading branch information
jingwei committed May 23, 2012
2 parents 73d8976 + 8de70be commit 0be6234
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/cleo/search/typeahead/MultiTypeahead.java
Expand Up @@ -33,7 +33,7 @@
import cleo.search.collector.Collector;
import cleo.search.collector.MultiCollector;
import cleo.search.collector.MultiSourceCollector;
import cleo.search.collector.SimpleCollector;
import cleo.search.collector.SortedCollector;
import cleo.search.util.Strings;

/**
Expand Down Expand Up @@ -88,7 +88,7 @@ public List<E> search(int uid, String[] terms, long timeoutMillis) {

@Override
public List<E> search(int uid, String[] terms, int maxNumResults, long timeoutMillis) {
Collector<E> collector = new SimpleCollector<E>(maxNumResults);
Collector<E> collector = new SortedCollector<E>(maxNumResults);
collector = search(uid, terms, collector, timeoutMillis);
return collector.elements();
}
Expand Down

0 comments on commit 0be6234

Please sign in to comment.