Skip to content

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

fixed type/cat properties

orbiterc5087710a422
diff --git a/htroot/index.java b/htroot/index.java
index 1697ed6b4..f312fe04c 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -117,7 +117,8 @@ public class index {
prop.put("results", "");
prop.put("urlmaskoptions", 0);
prop.put("urlmaskoptions_urlmaskfilter", ".*");
- prop.put("type", "href");
+ prop.put("cat", "href");
+ prop.put("type", "0");
prop.put("depth", "0");
return prop;
}
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 374b9f953..97331dc95 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -51,6 +51,7 @@ picPlus.src = "/env/grafics/plus.gif";
<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="cat" value="#[cat]#">
<input type="hidden" name="type" value="#[type]#">
</form>
</p><hr>
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index bf5138abf..12f95f24a 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -108,7 +108,7 @@ public class yacysearch {
prop.put("resource", "global");
prop.put("time", 6);
prop.put("urlmaskfilter", ".*");
- prop.put("type", "href");
+ prop.put("cat", "href");
prop.put("depth", "0");
prop.put("type", 0);
prop.put("type_excluded", 0);
@@ -131,7 +131,7 @@ public class yacysearch {
serverObjects prop = new serverObjects();
- if (post.get("type", "href").equals("href")) {
+ if (post.get("cat", "href").equals("href")) {
prop.put("type", 0); // set type of result: normal link list
final TreeSet query = plasmaSearchQuery.cleanQuery(querystring);
@@ -299,7 +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("type", "0");
+ prop.put("cat", "href");
prop.put("depth", "0");
// adding some additional properties needed for the rss feed
@@ -309,28 +310,25 @@ public class yacysearch {
}
- if (post.get("type", "href").equals("image")) {
- prop.put("type", 1); // set type of result: image list
+ if ((post.get("cat", "href").equals("image")) && (querystring.startsWith("http://"))) {
int depth = post.getInt("depth", 0);
-
- if (querystring.startsWith("http://")) {
- try {
- plasmaSearchImages si = new plasmaSearchImages(sb.snippetCache, 6000, new URL(querystring), depth);
- Iterator i = si.entries();
- htmlFilterImageEntry ie;
- int c = 0;
- while (i.hasNext()) {
- ie = (htmlFilterImageEntry) i.next();
- prop.put("type_results_" + c + "_url", ie.url().toString());
- c++;
- }
- prop.put("type_results", c);
- } catch (MalformedURLException e) {}
+ URL url = null;
+ try {url = new URL(querystring);} catch (MalformedURLException e) {}
+ plasmaSearchImages si = new plasmaSearchImages(sb.snippetCache, 6000, url, depth);
+ Iterator i = si.entries();
+ htmlFilterImageEntry ie;
+ int c = 0;
+ while (i.hasNext()) {
+ ie = (htmlFilterImageEntry) i.next();
+ prop.put("type_results_" + c + "_url", ie.url().toString());
+ c++;
}
-
+ prop.put("type_results", c);
+
+ prop.put("cat", "image");
+ prop.put("type", 1); // set type of result: image list
prop.put("former", post.get("search", ""));
- prop.put("type", "image");
prop.put("depth", depth);
}
// return rewrite properties