diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 1e6ede00d..15d7f793a 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -3,7 +3,7 @@
YaCy '#[clientname]#': Search Page
#%env/templates/metas.template%#
-
+
@@ -54,30 +54,7 @@ To see a list of all APIs, please visit the
-
-
- ::
-
-#(/input)#
#(searchagain)#
::
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 01645e1d1..ecd2d27c1 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -76,7 +76,6 @@ public class yacysearch {
final String browserPopUpPage = sb.getConfig(plasmaSwitchboardConstants.BROWSER_POP_UP_PAGE, "ConfigBasic.html");
if (browserPopUpPage.startsWith("index") || browserPopUpPage.startsWith("yacysearch")) display = 2;
}
- final int input = (post == null) ? 2 : post.getInt("input", 2);
String promoteSearchPageGreeting = env.getConfig(plasmaSwitchboardConstants.GREETING, "");
if (env.getConfigBool(plasmaSwitchboardConstants.GREETING_NETWORK_NAME, false)) promoteSearchPageGreeting = env.getConfig("network.unit.description", "");
final String client = header.get(httpRequestHeader.CONNECTION_PROP_CLIENTIP); // the search client who initiated the search
@@ -87,35 +86,32 @@ public class yacysearch {
final serverObjects prop = new serverObjects();
//final boolean rss = (post == null) ? false : post.get("rss", "false").equals("true");
- prop.put("input_promoteSearchPageGreeting", promoteSearchPageGreeting);
- prop.put("input_promoteSearchPageGreeting.homepage", sb.getConfig(plasmaSwitchboardConstants.GREETING_HOMEPAGE, ""));
- prop.put("input_promoteSearchPageGreeting.smallImage", sb.getConfig(plasmaSwitchboardConstants.GREETING_SMALL_IMAGE, ""));
- if ((post == null) || (env == null) || (querystring.length() == 0) || (!searchAllowed)) {
+ prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
+ prop.put("promoteSearchPageGreeting.homepage", sb.getConfig(plasmaSwitchboardConstants.GREETING_HOMEPAGE, ""));
+ prop.put("promoteSearchPageGreeting.smallImage", sb.getConfig(plasmaSwitchboardConstants.GREETING_SMALL_IMAGE, ""));
+ if ((post == null) || (env == null) || (!searchAllowed)) {
// we create empty entries for template strings
prop.put("searchagain", "0");
- prop.put("input", input);
prop.put("display", display);
- prop.put("input_input", input);
- prop.put("input_display", display);
- prop.put("input_former", "");
+ prop.put("display", display);
prop.put("former", "");
- prop.put("input_count", "10");
- prop.put("input_offset", "0");
- prop.put("input_resource", "global");
- prop.put("input_urlmaskfilter", (post == null) ? ".*" : post.get("urlmaskfilter", ".*"));
- prop.put("input_prefermaskfilter", (post == null) ? "" : post.get("prefermaskfilter", ""));
- prop.put("input_tenant", (post == null) ? "" : post.get("tenant", ""));
- prop.put("input_indexof", "off");
- prop.put("input_constraint", "");
- prop.put("input_cat", "href");
- prop.put("input_depth", "0");
- prop.put("input_verify", (post == null) ? "true" : post.get("verify", "true"));
- prop.put("input_contentdom", "text");
- prop.put("input_contentdomCheckText", "1");
- prop.put("input_contentdomCheckAudio", "0");
- prop.put("input_contentdomCheckVideo", "0");
- prop.put("input_contentdomCheckImage", "0");
- prop.put("input_contentdomCheckApp", "0");
+ prop.put("count", "10");
+ prop.put("offset", "0");
+ prop.put("resource", "global");
+ prop.put("urlmaskfilter", (post == null) ? ".*" : post.get("urlmaskfilter", ".*"));
+ prop.put("prefermaskfilter", (post == null) ? "" : post.get("prefermaskfilter", ""));
+ prop.put("tenant", (post == null) ? "" : post.get("tenant", ""));
+ prop.put("indexof", "off");
+ prop.put("constraint", "");
+ prop.put("cat", "href");
+ prop.put("depth", "0");
+ prop.put("verify", (post == null) ? "true" : post.get("verify", "true"));
+ prop.put("contentdom", "text");
+ prop.put("contentdomCheckText", "1");
+ prop.put("contentdomCheckAudio", "0");
+ prop.put("contentdomCheckVideo", "0");
+ prop.put("contentdomCheckImage", "0");
+ prop.put("contentdomCheckApp", "0");
prop.put("excluded", "0");
prop.put("results", "");
prop.put("resultTable", "0");
@@ -497,8 +493,8 @@ public class yacysearch {
prop.put("num-results", "3");
}
- prop.put("input_cat", "href");
- prop.put("input_depth", "0");
+ prop.put("cat", "href");
+ prop.put("depth", "0");
// adding some additional properties needed for the rss feed
String hostName = (String) header.get("Host", "localhost");
@@ -508,25 +504,23 @@ public class yacysearch {
}
prop.put("searchagain", global ? "1" : "0");
- prop.put("input", input);
prop.put("display", display);
- prop.put("input_input", input);
- prop.put("input_display", display);
- prop.putHTML("input_former", querystring);
- prop.put("input_count", itemsPerPage);
- prop.put("input_offset", offset);
- prop.put("input_resource", global ? "global" : "local");
- prop.putHTML("input_urlmaskfilter", originalUrlMask);
- prop.putHTML("input_prefermaskfilter", prefermask);
- prop.put("input_indexof", (indexof) ? "on" : "off");
- prop.put("input_constraint", (constraint == null) ? "" : constraint.exportB64());
- prop.put("input_verify", (fetchSnippets) ? "true" : "false");
- prop.put("input_contentdom", (post == null ? "text" : post.get("contentdom", "text")));
- prop.put("input_contentdomCheckText", (contentdomCode == plasmaSearchQuery.CONTENTDOM_TEXT) ? "1" : "0");
- prop.put("input_contentdomCheckAudio", (contentdomCode == plasmaSearchQuery.CONTENTDOM_AUDIO) ? "1" : "0");
- prop.put("input_contentdomCheckVideo", (contentdomCode == plasmaSearchQuery.CONTENTDOM_VIDEO) ? "1" : "0");
- prop.put("input_contentdomCheckImage", (contentdomCode == plasmaSearchQuery.CONTENTDOM_IMAGE) ? "1" : "0");
- prop.put("input_contentdomCheckApp", (contentdomCode == plasmaSearchQuery.CONTENTDOM_APP) ? "1" : "0");
+ prop.put("display", display);
+ prop.putHTML("former", querystring);
+ prop.put("count", itemsPerPage);
+ prop.put("offset", offset);
+ prop.put("resource", global ? "global" : "local");
+ prop.putHTML("urlmaskfilter", originalUrlMask);
+ prop.putHTML("prefermaskfilter", prefermask);
+ prop.put("indexof", (indexof) ? "on" : "off");
+ prop.put("constraint", (constraint == null) ? "" : constraint.exportB64());
+ prop.put("verify", (fetchSnippets) ? "true" : "false");
+ prop.put("contentdom", (post == null ? "text" : post.get("contentdom", "text")));
+ prop.put("contentdomCheckText", (contentdomCode == plasmaSearchQuery.CONTENTDOM_TEXT) ? "1" : "0");
+ prop.put("contentdomCheckAudio", (contentdomCode == plasmaSearchQuery.CONTENTDOM_AUDIO) ? "1" : "0");
+ prop.put("contentdomCheckVideo", (contentdomCode == plasmaSearchQuery.CONTENTDOM_VIDEO) ? "1" : "0");
+ prop.put("contentdomCheckImage", (contentdomCode == plasmaSearchQuery.CONTENTDOM_IMAGE) ? "1" : "0");
+ prop.put("contentdomCheckApp", (contentdomCode == plasmaSearchQuery.CONTENTDOM_APP) ? "1" : "0");
// for RSS: don't HTML encode some elements
prop.putXML("rss_query", querystring);
diff --git a/htroot/yacysearch.json b/htroot/yacysearch.json
index b430eb077..a73957dbf 100644
--- a/htroot/yacysearch.json
+++ b/htroot/yacysearch.json
@@ -5,11 +5,11 @@
"channels": [{
"title": "YaCy P2P-Search for #[rss_query]#",
"description": "Search for #[rss_query]#",
- "link": "#[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[input_resource]#&contentdom=#[input_contentdom]#&verify=#[input_verify]#",
+ "link": "#[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]#",
"image": {
"url": "#[rssYacyImageURL]#",
"title": "Search for #[rss_query]#",
- "link": "#[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[input_resource]#&contentdom=#[input_contentdom]#&verify=#[input_verify]#"
+ "link": "#[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]#"
},
"totalResults": "#[num-results_totalcount]#",
"startIndex": "#[num-results_offset]#",
diff --git a/htroot/yacysearch.rss b/htroot/yacysearch.rss
index 68d6ea272..7af4b92ee 100644
--- a/htroot/yacysearch.rss
+++ b/htroot/yacysearch.rss
@@ -4,15 +4,15 @@
xmlns:yacy="http://www.yacy.net/"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom">
-
+
- YaCy P2P-Search for #[rss_query]#
+ #[promoteSearchPageGreeting]#
Search for #[rss_query]#
- #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[input_resource]#&contentdom=#[input_contentdom]#&verify=#[input_verify]#
+ #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]#
#[rssYacyImageURL]#
Search for #[rss_query]#
- #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[input_resource]#&contentdom=#[input_contentdom]#&verify=#[input_verify]#
+ #[searchBaseURL]#?query=#[rss_queryenc]#&resource=#[resource]#&contentdom=#[contentdom]#&verify=#[verify]#
#[num-results_totalcount]#
#[num-results_offset]#
diff --git a/source/de/anomic/plasma/plasmaSearchQuery.java b/source/de/anomic/plasma/plasmaSearchQuery.java
index f190eddae..eee2fe2b6 100644
--- a/source/de/anomic/plasma/plasmaSearchQuery.java
+++ b/source/de/anomic/plasma/plasmaSearchQuery.java
@@ -243,8 +243,12 @@ public final class plasmaSearchQuery {
@SuppressWarnings("unchecked")
public static TreeSet[] cleanQuery(String querystring) {
- // returns three sets: a query set, a exclude set and a full query set
- if ((querystring == null) || (querystring.length() == 0)) return new TreeSet[]{new TreeSet(NaturalOrder.naturalComparator), new TreeSet(NaturalOrder.naturalComparator)};
+ // returns three sets: a query set, a exclude set and a full query set
+ final TreeSet query = new TreeSet(NaturalOrder.naturalComparator);
+ final TreeSet exclude = new TreeSet(NaturalOrder.naturalComparator);
+ final TreeSet fullquery = new TreeSet(NaturalOrder.naturalComparator);
+
+ if ((querystring == null) || (querystring.length() == 0)) return new TreeSet[]{query, exclude, fullquery};
// convert Umlaute
querystring = htmlFilterAbstractScraper.stripAll(querystring).toLowerCase().trim();
@@ -256,9 +260,6 @@ public final class plasmaSearchQuery {
String s;
int l;
// the string is clean now, but we must generate a set out of it
- final TreeSet query = new TreeSet(NaturalOrder.naturalComparator);
- final TreeSet exclude = new TreeSet(NaturalOrder.naturalComparator);
- final TreeSet fullquery = new TreeSet(NaturalOrder.naturalComparator);
final String[] a = querystring.split(" ");
for (int i = 0; i < a.length; i++) {
if (a[i].startsWith("-")) {