Skip to content

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

patch for wrong old RWI entries

orbiter97596af84336
diff --git a/source/de/anomic/index/indexRWIEntryNew.java b/source/de/anomic/index/indexRWIEntryNew.java
index 31dd574a0..6c97eb6cf 100644
--- a/source/de/anomic/index/indexRWIEntryNew.java
+++ b/source/de/anomic/index/indexRWIEntryNew.java
@@ -159,7 +159,7 @@ public class indexRWIEntryNew implements Cloneable, indexRWIEntry {
this.entry.setCol(col_wordsInText, oldEntry.wordcount());
this.entry.setCol(col_phrasesInText, oldEntry.phrasecount());
this.entry.setCol(col_doctype, new byte[]{(byte) oldEntry.doctype()});
- this.entry.setCol(col_language, oldEntry.getLanguage(), null);
+ this.entry.setCol(col_language, (oldEntry.getLanguage() == null) ? "en" : oldEntry.getLanguage(), null);
this.entry.setCol(col_llocal, 0);
this.entry.setCol(col_lother, 0);
int domlen = plasmaURL.domLengthEstimation(oldEntry.urlHash());
diff --git a/source/de/anomic/kelondro/kelondroRow.java b/source/de/anomic/kelondro/kelondroRow.java
index b00f3755c..bd006f1f6 100644
--- a/source/de/anomic/kelondro/kelondroRow.java
+++ b/source/de/anomic/kelondro/kelondroRow.java
@@ -297,7 +297,7 @@ public class kelondroRow {
setCol(column, cell.getBytes());
else
try {
- setCol(column, cell.getBytes(encoding));
+ setCol(column, (cell == null) ? null : cell.getBytes(encoding));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}