diff --git a/htroot/Status.html b/htroot/Status.html index f9f06ba82..1db96bbc4 100644 --- a/htroot/Status.html +++ b/htroot/Status.html @@ -3,7 +3,6 @@ YaCy '#[clientname]#': Console Status #%env/templates/metas.template%# - #%env/templates/header.template%# @@ -24,10 +23,13 @@
-

Welcome to YaCy!


+

Welcome to YaCy!


+
banner
- +
diff --git a/htroot/js/query.js b/htroot/js/query.js new file mode 100755 index 000000000..816ef9229 --- /dev/null +++ b/htroot/js/query.js @@ -0,0 +1,18 @@ +var query = new Object(); + +function getQueryProps() { + var text = ""; + for (property in query) { + text += property + " = " + query[property] + ";\n"; + } + return text; +} + +function getURLparameters() { + if (self.location.search.indexOf("=") == -1) {return;} + var parameterArray = unescape(self.location.search).substring(1).split("&"); + for (var i=0;irss terminal + +function loaderInit() { + loader=window.setInterval("load()", 8000); + load(); +} - - -
-
-
-
-
- +function load() { + getRSS("http://localhost:8080/xml/feed.rss?set=PEERNEWS"); +} + +function windowsizing() { + if (query.maxlines) maxlines = query.maxlines; + if (query.maxwidth) maxwidth = query.maxwidth; + if (query.maxtime) maxtime = query.maxtime; + if (query.minwait) minwait = query.minwait; + if (query.maxwait) maxwait = query.maxwait; + if (query.width) { + document.getElementById("feedbox").style.width = query.width; + } + if (query.height) { + document.getElementById("feedbox").style.height = query.height; + } +} - + + + +
+

+
+ diff --git a/htroot/xml/feed.java b/htroot/xml/feed.java index fb00ae2c2..b96cd7a19 100755 --- a/htroot/xml/feed.java +++ b/htroot/xml/feed.java @@ -47,7 +47,7 @@ public class feed { if ((post == null) || (env == null)) return prop; //boolean authorized = sb.adminAuthenticated(header) >= 2; - String channelName = post.get("channel"); + String channelName = post.get("set"); if (channelName == null) return prop; RSSFeed feed = RSSFeed.channels(channelName); diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java index 6e8d43c2f..c6ad03345 100644 --- a/htroot/yacy/search.java +++ b/htroot/yacy/search.java @@ -51,6 +51,8 @@ import de.anomic.server.serverObjects; import de.anomic.server.serverProfiling; import de.anomic.server.serverSwitch; import de.anomic.tools.crypt; +import de.anomic.xml.RSSFeed; +import de.anomic.xml.RSSMessage; import de.anomic.yacy.yacyCore; import de.anomic.yacy.yacyNetwork; import de.anomic.yacy.yacySeed; @@ -125,10 +127,11 @@ public final class search { TreeSet abstractSet = ((abstracts.length() == 0) || (abstracts.equals("auto"))) ? null : plasmaSearchQuery.hashes2Set(abstracts); // store accessing peer + yacySeed remoteSeed = yacySeed.genRemoteSeed(oseed, key, true); if (yacyCore.seedDB == null) { yacyCore.log.logSevere("yacy.search: seed cache not initialized"); } else { - yacyCore.peerActions.peerArrival(yacySeed.genRemoteSeed(oseed, key, true), true); + yacyCore.peerActions.peerArrival(remoteSeed, true); } // prepare search @@ -177,6 +180,7 @@ public final class search { theQuery = new plasmaSearchQuery(null, queryhashes, excludehashes, rankingProfile, maxdist, prefer, plasmaSearchQuery.contentdomParser(contentdom), false, count, 0, filter, plasmaSearchQuery.SEARCHDOM_LOCAL, null, -1, constraint, false, yacyURL.TLD_any_zone_filter, client); theQuery.domType = plasmaSearchQuery.SEARCHDOM_LOCAL; yacyCore.log.logInfo("INIT HASH SEARCH (query-" + abstracts + "): " + plasmaSearchQuery.anonymizedQueryHashes(theQuery.queryHashes) + " - " + theQuery.displayResults() + " links"); + RSSFeed.channels("PEERNEWS").addMessage(new RSSMessage("Remote Search Request from " + remoteSeed.getName(), plasmaSearchQuery.anonymizedQueryHashes(theQuery.queryHashes))); // make event theSearch = plasmaSearchEvent.getEvent(theQuery, rankingProfile, sb.wordIndex, sb.crawlResults, null, true); diff --git a/source/de/anomic/plasma/plasmaSearchEvent.java b/source/de/anomic/plasma/plasmaSearchEvent.java index 0c085faab..7e877626c 100644 --- a/source/de/anomic/plasma/plasmaSearchEvent.java +++ b/source/de/anomic/plasma/plasmaSearchEvent.java @@ -218,7 +218,7 @@ public final class plasmaSearchEvent { if (url == null) continue; //System.out.println("***DEBUG*** SEARCH RESULT URL=" + url.toNormalform(false, false)); - resultEntry = obtainResultEntry(uentry, (snippetComputationAllTime < 300) ? 1 : 0); + resultEntry = obtainResultEntry(uentry, (snippetComputationAllTime < 100) ? 1 : 0); if (resultEntry == null) continue; // the entry had some problems, cannot be used urlRetrievalAllTime += resultEntry.dbRetrievalTime; snippetComputationAllTime += resultEntry.snippetComputationTime; @@ -350,7 +350,7 @@ public final class plasmaSearchEvent { if (query.contentdom == plasmaSearchQuery.CONTENTDOM_TEXT) { // attach text snippet startTime = System.currentTimeMillis(); - plasmaSnippetCache.TextSnippet snippet = plasmaSnippetCache.retrieveTextSnippet(comp, snippetFetchWordHashes, (snippetFetchMode == 2), ((query.constraint != null) && (query.constraint.get(plasmaCondenser.flag_cat_indexof))), 180, 3000, (snippetFetchMode == 2) ? Integer.MAX_VALUE : 100000, query.isGlobal()); + plasmaSnippetCache.TextSnippet snippet = plasmaSnippetCache.retrieveTextSnippet(comp, snippetFetchWordHashes, (snippetFetchMode == 2), ((query.constraint != null) && (query.constraint.get(plasmaCondenser.flag_cat_indexof))), 180, 3000, (snippetFetchMode == 2) ? Integer.MAX_VALUE : 30000, query.isGlobal()); long snippetComputationTime = System.currentTimeMillis() - startTime; serverLog.logInfo("SEARCH_EVENT", "text snippet load time for " + comp.url() + ": " + snippetComputationTime + ", " + ((snippet.getErrorCode() < 11) ? "snippet found" : ("no snippet found (" + snippet.getError() + ")"))); diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index 9436158a4..54c0fa19a 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -59,6 +59,8 @@ import de.anomic.kelondro.kelondroRotateIterator; import de.anomic.kelondro.kelondroRowSet; import de.anomic.server.serverMemory; import de.anomic.server.logging.serverLog; +import de.anomic.xml.RSSFeed; +import de.anomic.xml.RSSMessage; import de.anomic.yacy.yacyDHTAction; import de.anomic.yacy.yacySeedDB; import de.anomic.yacy.yacyURL; @@ -663,6 +665,7 @@ public final class plasmaWordIndex implements indexRI { "Anchors: " + ((document.getAnchors() == null) ? 0 : document.getAnchors().size()) + "\n\tLinkStorageTime: " + (storageEndTime - startTime) + " ms | " + "indexStorageTime: " + (indexingEndTime - storageEndTime) + " ms"); + RSSFeed.channels("PEERNEWS").addMessage(new RSSMessage("Indexed web page", entry.url().toNormalform(true, false))); } // finished diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index 2f1891050..81124a204 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -63,6 +63,7 @@ import java.net.Socket; import java.net.SocketException; import java.nio.channels.ClosedByInterruptException; import java.security.KeyStore; +import java.util.ConcurrentModificationException; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; @@ -481,7 +482,13 @@ public final class serverCore extends serverAbstractBusyThread implements server // shut down all busySessions if (this.busySessions != null) for (Session session: this.busySessions) { - try {session.interrupt();} catch (SecurityException e ) {e.printStackTrace();} + try { + session.interrupt(); + } catch (SecurityException e ) { + e.printStackTrace(); + } catch (ConcurrentModificationException e) { + e.printStackTrace(); + } } // closing the port forwarding channel diff --git a/source/de/anomic/yacy/yacyNewsPool.java b/source/de/anomic/yacy/yacyNewsPool.java index c7464d429..03f17b8f5 100644 --- a/source/de/anomic/yacy/yacyNewsPool.java +++ b/source/de/anomic/yacy/yacyNewsPool.java @@ -340,6 +340,9 @@ public class yacyNewsPool { // double-check with old news if (newsDB.get(record.id()) != null) return; incomingNews.push(record); + + // add message to feed channel + //RSSFeed.channels("PEERNEWS").addMessage(new RSSMessage("Incoming News: " + record.category() + " from " + record.originator(), record.attributes().toString())); } public int size(int dbKey) { diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java index 507b573a8..97057355d 100644 --- a/source/de/anomic/yacy/yacyVersion.java +++ b/source/de/anomic/yacy/yacyVersion.java @@ -37,7 +37,6 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import java.util.SortedSet; import java.util.TreeSet; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -511,7 +510,7 @@ public final class yacyVersion implements Comparator, Comparable downloadedreleases = new TreeSet(); + TreeSet downloadedreleases = new TreeSet(); for (int j = 0; j < downloaded.length; j++) { try { release = new yacyVersion(downloaded[j]); @@ -534,20 +533,18 @@ public final class yacyVersion implements Comparator, Comparable iter = downloadedreleases.iterator(); + while (iter.hasNext()) { + release = iter.next(); + + if(keepMain && release.mainRelease) { + // we found the latest main release + keepMain = false; + continue; } // check file age - File downloadedFile = new File(filesPath + File.separator + filename); + File downloadedFile = new File(filesPath + File.separator + release.name); if(now - downloadedFile.lastModified() > deleteAfterMillis) { // delete file if(!downloadedFile.delete()) {