Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix for index import
Michael Peter Christend0aff91f233d
diff --git a/source/net/yacy/document/content/SurrogateReader.java b/source/net/yacy/document/content/SurrogateReader.javaindex 0bb47b8f3..a24f77678 100644--- a/source/net/yacy/document/content/SurrogateReader.java+++ b/source/net/yacy/document/content/SurrogateReader.java@@ -178,12 +178,11 @@ public class SurrogateReader extends DefaultHandler implements Runnable {private boolean isSolrDump() {try {- if (this.inputStream.available() < 60) return false;byte[] b = new byte[100];this.inputStream.read(b);try {String s = UTF8.String(b);- if (s.contains("<response>") && s.contains("<result>")) {+ if ((s.contains("<response>") && s.contains("<result>")) || s.startsWith("<doc>")) {this.inputStream.unread(b);return true;}diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex bae47c53f..4d9464ed0 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -1945,9 +1945,7 @@ public final class Switchboard extends serverSwitch {InputStream is = null;try {is = new BufferedInputStream(new FileInputStream(infile));- if ( s.endsWith(".gz") ) {- is = new GZIPInputStream(is);- }+ if (s.endsWith(".gz")) is = new GZIPInputStream(is, 65535);processSurrogate(is, infile.getName());} catch (final IOException e ) {ConcurrentLog.logException(e);