Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

patch for bad values during local search join

orbiter7e2d6fac128d
diff --git a/source/net/yacy/kelondro/data/word/WordReferenceVars.java b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
index 6634ec560..de13b7234 100644
--- a/source/net/yacy/kelondro/data/word/WordReferenceVars.java
+++ b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
@@ -316,7 +316,7 @@ public class WordReferenceVars extends AbstractReference implements WordReferenc
if (this.virtualAge > (v = other.virtualAge)) this.virtualAge = v;
if (this.wordsintext > (v = other.wordsintext)) this.wordsintext = v;
if (this.phrasesintext > (v = other.phrasesintext)) this.phrasesintext = v;
- this.positions = a(Math.min(min(this.positions), min(other.positions)));
+ this.positions = this.positions == null ? other.positions : other.positions == null ? this.positions : a(Math.min(min(this.positions), min(other.positions)));
if (this.posinphrase > (v = other.posinphrase)) this.posinphrase = v;
if (this.posofphrase > (v = other.posofphrase)) this.posofphrase = v;
if (this.lastModified > (w = other.lastModified)) this.lastModified = w;
@@ -338,7 +338,7 @@ public class WordReferenceVars extends AbstractReference implements WordReferenc
if (this.virtualAge < (v = other.virtualAge)) this.virtualAge = v;
if (this.wordsintext < (v = other.wordsintext)) this.wordsintext = v;
if (this.phrasesintext < (v = other.phrasesintext)) this.phrasesintext = v;
- this.positions = a(Math.max(max(this.positions), max(other.positions)));
+ this.positions = this.positions == null ? other.positions : other.positions == null ? this.positions : a(Math.max(max(this.positions), max(other.positions)));
if (this.posinphrase < (v = other.posinphrase)) this.posinphrase = v;
if (this.posofphrase < (v = other.posofphrase)) this.posofphrase = v;
if (this.lastModified < (w = other.lastModified)) this.lastModified = w;