Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixed search page (there had been some unresolved patterns)
orbitera922d9444d45
diff --git a/build.properties b/build.propertiesindex 64a4f7aca..16038e401 100644--- a/build.properties+++ b/build.properties@@ -3,7 +3,7 @@ javacSource=1.4javacTarget=1.4# Release Configuration-releaseVersion=0.512+releaseVersion=0.513releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz#releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gzreleaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 7931a8a74..dfc69fe3d 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -29,7 +29,7 @@<fieldset class="yacys"><input id="search" name="search" type="text" size="50" maxlength="80" value="#[former]#" onclick="document.getElementById('Enter').value = 'Search'" /><input id="Enter" type="submit" name="Enter" value="Search" /> - <a href="index.html?display=#[display]#&searchoptions=1&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=#[urlmaskfilter]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&type=#[type]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#">more options</a>+ <a href="index.html?display=#[display]#&input=#[input]#&searchoptions=1&count=#[count]#&resource=#[resource]#&time=#[time]#&urlmaskfilter=#[urlmaskfilter]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&type=#[type]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#">more options</a><div class="yacysearch"><input type="radio" id="text" name="contentdom" value="text"#(contentdomCheckText)#:: checked="checked"#(/contentdomCheckText)# /><label for="text">Text</label> @@ -44,7 +44,6 @@</div><input type="hidden" name="former" value="#[former]#" /><input type="hidden" name="count" value="#[count]#" />- <input type="hidden" name="order" value="#[order]#" /><input type="hidden" name="resource" value="#[resource]#" /><input type="hidden" name="time" value="#[time]#" /><input type="hidden" name="urlmaskfilter" value="#[urlmaskfilter]#" />@@ -106,7 +105,7 @@ document.getElementById("Enter").value = "search again - catch up more links";<p><strong>Refine your search with these topwords</strong>:</p><p>#{words}#- <a href="yacysearch.html?search=#[newsearch]#&Enter=Search&count=#[count]#&order=#[order]#&resource=#[resource]#&time=#[time]#">#[word]#</a>+ <a href="yacysearch.html?search=#[newsearch]#&Enter=Search&count=#[count]#&resource=#[resource]#&time=#[time]#">#[word]#</a>#{/words}#</p>#(/combine)#diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 2d03c87d6..436153d3f 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -52,7 +52,6 @@ import java.net.MalformedURLException;import java.net.URLEncoder;import java.util.HashMap;import java.util.Iterator;-import java.util.Set;import java.util.regex.PatternSyntaxException;import java.util.TreeSet;@@ -92,7 +91,8 @@ public class yacysearch {final plasmaSwitchboard sb = (plasmaSwitchboard) env;boolean authenticated = sb.adminAuthenticated(header) >= 2;- int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);+ int display = (post == null) ? 0 : post.getInt("display", 0);+ if ((display == 1) && (!authenticated)) display = 0;int input = (post == null) ? 0 : post.getInt("input", 1);String promoteSearchPageGreeting = env.getConfig("promoteSearchPageGreeting", "");if (promoteSearchPageGreeting.length() == 0) promoteSearchPageGreeting = "P2P WEB SEARCH";@@ -120,7 +120,10 @@ public class yacysearch {// we create empty entries for template stringsfinal serverObjects prop = new serverObjects();+ prop.put("input", input);prop.put("display", display);+ prop.put("input_input", input);+ prop.put("input_display", display);prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting);prop.put("input_former", "");prop.put("input_count", 10);@@ -144,7 +147,6 @@ public class yacysearch {prop.put("input_contentdomCheckVideo", 0);prop.put("input_contentdomCheckImage", 0);prop.put("input_contentdomCheckApp", 0);- prop.put("input", 0);return prop;}@@ -255,7 +257,6 @@ public class yacysearch {final boolean globalsearch = (global) && (yacyonline) && (!samesearch);// do the search- Set querywords = query[0];plasmaSearchQuery thisSearch = new plasmaSearchQuery(querystring,plasmaCondenser.words2hashes(query[0]),@@ -317,7 +318,7 @@ public class yacysearch {prop.put("type_results_" + i + "_ybr", plasmaSearchPreOrder.ybr(result.getUrlentry().hash()));prop.put("type_results_" + i + "_size", Long.toString(result.getUrlentry().size()));try {- prop.put("type_results_" + i + "_words", URLEncoder.encode(querywords.toString(),"UTF-8"));+ prop.put("type_results_" + i + "_words", URLEncoder.encode(query[0].toString(),"UTF-8"));} catch (UnsupportedEncodingException e) {}prop.put("type_results_" + i + "_former", results.getFormerSearch());prop.put("type_results_" + i + "_rankingprops", result.getUrlentry().word().toPropertyForm() + ", domLengthEstimated=" + plasmaURL.domLengthEstimation(result.getUrlhash()) +@@ -439,10 +440,10 @@ public class yacysearch {}}- prop.put("type", (thisSearch.contentdom == plasmaSearchQuery.CONTENTDOM_TEXT) ? 0 : ((thisSearch.contentdom == plasmaSearchQuery.CONTENTDOM_IMAGE) ? 2 : 1));+ prop.put("input_type", (thisSearch.contentdom == plasmaSearchQuery.CONTENTDOM_TEXT) ? 0 : ((thisSearch.contentdom == plasmaSearchQuery.CONTENTDOM_IMAGE) ? 2 : 1));if (prop.getInt("type", 0) == 1) prop.put("type_mediatype", contentdomString);- prop.put("cat", "href");- prop.put("depth", "0");+ prop.put("input_cat", "href");+ prop.put("input_depth", "0");// adding some additional properties needed for the rss feedString hostName = (String) header.get("Host", "localhost");@@ -478,9 +479,9 @@ public class yacysearch {}prop.put("type_results", line);- prop.put("type", 3); // set type of result: image list- prop.put("cat", "href");- prop.put("depth", depth);+ prop.put("input_type", 3); // set type of result: image list+ prop.put("input_cat", "href");+ prop.put("input_depth", depth);}// if user is not authenticated, he may not vote for URLs@@ -488,7 +489,10 @@ public class yacysearch {for (int i=0; i<linkcount; i++)prop.put("type_results_" + i + "_authorized", (authenticated) ? 1 : 0);+ prop.put("input", input);prop.put("display", display);+ prop.put("input_input", input);+ prop.put("input_display", display);prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting);prop.put("input_former", post.get("search", ""));prop.put("input_count", count);@@ -504,7 +508,7 @@ public class yacysearch {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("input", input);+// return rewrite propertiesreturn prop;