From 585a8f3c440c98b66f2a3d1a5f46704f4cc3da3b Mon Sep 17 00:00:00 2001 From: Michael Christen Date: Mon, 2 Jan 2012 02:10:39 +0100 Subject: [PATCH] fixed a bug in search sequence (caused emtpy results) --- source/net/yacy/search/query/RWIProcess.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/search/query/RWIProcess.java b/source/net/yacy/search/query/RWIProcess.java index 5bed45c0d..8433a1fab 100644 --- a/source/net/yacy/search/query/RWIProcess.java +++ b/source/net/yacy/search/query/RWIProcess.java @@ -93,6 +93,7 @@ public final class RWIProcess extends Thread private final ReferenceOrder order; private final long startTime; private boolean addRunning; + private boolean fresh; // navigation scores private final ScoreMap hostNavigator; // a counter for the appearance of the host hash @@ -136,6 +137,7 @@ public final class RWIProcess extends Thread this.maxExpectedRemoteReferences = new AtomicInteger(0); this.expectedRemoteReferences = new AtomicInteger(0); this.receivedRemoteReferences = new AtomicInteger(0); + this.fresh = true; } public void addExpectedRemoteReferences(int x) { @@ -388,10 +390,11 @@ public final class RWIProcess extends Thread public void oneFeederStarted() { this.feeders.addAndGet(1); + this.fresh = false; } public boolean feedingIsFinished() { - return this.feeders.get() <= 0; + return !this.fresh && this.feeders.get() <= 0; } private boolean testFlags(final WordReference ientry) {