Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added better option handling in yacysearch added depth option for image presentation
orbiter47b541b2d155
diff --git a/htroot/index.java b/htroot/index.javaindex 8c4e36fb2..1697ed6b4 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -117,6 +117,8 @@ public class index {prop.put("results", "");prop.put("urlmaskoptions", 0);prop.put("urlmaskoptions_urlmaskfilter", ".*");+ prop.put("type", "href");+ prop.put("depth", "0");return prop;}diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 1ba4fafd2..374b9f953 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -50,6 +50,8 @@ picPlus.src = "/env/grafics/plus.gif";<input type="hidden" name="resource" value="#[resource]#"><input type="hidden" name="time" value="#[time]#"><input type="hidden" name="urlmaskfilter" value="#[urlmaskfilter]#">+ <input type="hidden" name="depth" value="#[depth]#">+ <input type="hidden" name="type" value="#[type]#"></form></p><hr>diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 47c018573..bf5138abf 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -108,6 +108,8 @@ public class yacysearch {prop.put("resource", "global");prop.put("time", 6);prop.put("urlmaskfilter", ".*");+ prop.put("type", "href");+ prop.put("depth", "0");prop.put("type", 0);prop.put("type_excluded", 0);prop.put("type_num-results", 0);@@ -297,6 +299,8 @@ public class yacysearch {prop.put("resource", (global) ? "global" : "local");prop.put("time", searchtime / 1000);prop.put("urlmaskfilter", urlmask);+ prop.put("type", "href");+ prop.put("depth", "0");// adding some additional properties needed for the rss feedString hostName = (String) header.get("Host", "localhost");@@ -308,9 +312,11 @@ public class yacysearch {if (post.get("type", "href").equals("image")) {prop.put("type", 1); // set type of result: image list+ int depth = post.getInt("depth", 0);+if (querystring.startsWith("http://")) {try {- plasmaSearchImages si = new plasmaSearchImages(sb.snippetCache, 6000, new URL(querystring), 0);+ plasmaSearchImages si = new plasmaSearchImages(sb.snippetCache, 6000, new URL(querystring), depth);Iterator i = si.entries();htmlFilterImageEntry ie;int c = 0;@@ -322,6 +328,10 @@ public class yacysearch {prop.put("type_results", c);} catch (MalformedURLException e) {}}++ prop.put("former", post.get("search", ""));+ prop.put("type", "image");+ prop.put("depth", depth);}// return rewrite propertiesreturn prop;diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.javaindex d6c0224fc..154c8721b 100644--- a/source/de/anomic/plasma/plasmaParser.java+++ b/source/de/anomic/plasma/plasmaParser.java@@ -899,6 +899,7 @@ final class plasmaParserFactory implements KeyedPoolableObjectFactory {theParser.reset();}}+}final class plasmaParserPool extends GenericKeyedObjectPool {diff --git a/source/de/anomic/plasma/plasmaSearchImages.java b/source/de/anomic/plasma/plasmaSearchImages.javaindex 6311173f5..a5023f5fa 100644--- a/source/de/anomic/plasma/plasmaSearchImages.java+++ b/source/de/anomic/plasma/plasmaSearchImages.java@@ -61,7 +61,7 @@ public final class plasmaSearchImages {if (maxTime > 10) {byte[] res = sc.getResource(url, true, (int) maxTime);if (res != null) {- plasmaParserDocument document = sc.parseDocument(url, res); // #### THIS RETURNS ONLY ANCHOR TAGS! BUG! ###+ plasmaParserDocument document = sc.parseDocument(url, res);// add the image linksthis.addAll(document.getImages());