Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
tried to fix local search in yacy-ui
orbiterc73cf05ddd44
diff --git a/htroot/xml/util/ynetSearch.java b/htroot/xml/util/ynetSearch.javaindex f227394cb..ef0ae4d45 100644--- a/htroot/xml/util/ynetSearch.java+++ b/htroot/xml/util/ynetSearch.java@@ -50,8 +50,13 @@ public class ynetSearch {}} else {InputStream is = null;- try {- final String s = post.get("url")+"&search="+post.get("search")+"&count="+post.get("count")+"&offset="+post.get("offset");+ try {+ String searchaddress = post.get("url");+ if (!searchaddress.startsWith("http://")) {+ // a relative path .. this addresses the local peer+ searchaddress = "http://" + switchboard.webIndex.seedDB.mySeed().getPublicAddress() + (searchaddress.startsWith("/") ? "" : "/") + searchaddress;+ }+ final String s = searchaddress+"&search="+post.get("search")+"&count="+post.get("count")+"&offset="+post.get("offset");final URL url = new URL(s);is = url.openStream();final String httpout = new Scanner(is).useDelimiter( "\\Z" ).next();diff --git a/htroot/yacy/ui/sidebar/sidebar_1.html b/htroot/yacy/ui/sidebar/sidebar_1.htmlindex 7c87a33fa..f2780c0b9 100644--- a/htroot/yacy/ui/sidebar/sidebar_1.html+++ b/htroot/yacy/ui/sidebar/sidebar_1.html@@ -70,8 +70,12 @@<label for="resource">Resource/Network:</label><br /><select name="resource" class="selector">+ <!--<option value="/yacysearch.rss?resource=global&verify=true" selected="selected">freeworld</option><option value="/yacysearch.rss?resource=local&verify=true" >local peer</option>+ -->+ <option value="/xml/util/ynetSearch.xml?login=&url=/yacysearch.rss?resource=global&verify=true" >this cluster</option>+ <option value="/xml/util/ynetSearch.xml?login=&url=/yacysearch.rss?resource=local&verify=true" >this peer</option><option value="ymarks" >bookmarks</option><option value="/xml/util/ynetSearch.xml?login=&url=http://sciencenet.fzk.de:8080/yacysearch.rss?resource=global&verify=true" >sciencenet</option></select>