summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-22 00:01:06 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-22 00:01:06 +0200
commit778c608eec6c4883cb5f9602230b2b0b6358fa91 (patch)
tree59c2209c949ff2faf4478c77dd65ba0a3549e6f2 /container-search
parent592a44f1fedc654c5e52fb342d320e1828a261f8 (diff)
Avoid the implicit sorting that deepIterator does as a sideeffect.
It is not worthwhile. Especially when you do not have a document id.
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
index 9af684cf418..fb003463dba 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/Dispatcher.java
@@ -92,9 +92,9 @@ public class Dispatcher extends AbstractComponent {
}
/** Return a map of hits by their search node (partition) id */
- private ListMap<Integer, FastHit> hitsByNode(Result result) {
+ private static ListMap<Integer, FastHit> hitsByNode(Result result) {
ListMap<Integer, FastHit> hitsByPartition = new ListMap<>();
- for (Iterator<Hit> i = result.hits().deepIterator() ; i.hasNext(); ) {
+ for (Iterator<Hit> i = result.hits().unorderedDeepIterator() ; i.hasNext(); ) {
Hit h = i.next();
if ( ! (h instanceof FastHit)) continue;
FastHit hit = (FastHit)h;