Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- added host, path, filename to search result - modified yacyinteractive, shows now also date - added size attribut to export file in xml format
orbiterde714783b17b
diff --git a/htroot/yacyinteractive.html b/htroot/yacyinteractive.htmlindex a84e77543..9bd85aafe 100644--- a/htroot/yacyinteractive.html+++ b/htroot/yacyinteractive.html@@ -53,16 +53,16 @@ function updatepage(str) {var item;html += "<table class=\"networkTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"99%\">";html += "<tr class=\"TableHeader\" valign=\"bottom\">";- html += "<td width=\"30%\">Name</td>";+ html += "<td>Name</td>";html += "<td width=\"60\">Size</td>";//html += "<td>Description</td>";- html += "<td>Link</td></tr>";+ html += "<td width=\"180\">Date</td></tr>";for (var i = 0; i < firstChannel.items.length; i++) {item = firstChannel.items[i];- html += "<tr class=\"TableCellLight\"><td>"+ item.title + "</td>";+ html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"" + item.link + "\">" + item.title + "</a></td>";html += "<td align=\"right\">" + item.sizename + "</td>";//html += "<td>" + item.description + "</td>";- html += "<td><a href=\"" + item.link + "\">" + item.link + "</a></td></tr>";+ html += "<td align=\"right\">" + item.pubDate + "</td></tr>";}html += "</table>";}diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.javaindex 61eeba2ee..1722b7b18 100644--- a/htroot/yacysearchitem.java+++ b/htroot/yacysearchitem.java@@ -124,8 +124,11 @@ public class yacysearchitem {prop.put("content_date", plasmaSwitchboard.dateString(result.modified()));prop.put("content_date822", plasmaSwitchboard.dateString822(result.modified()));prop.put("content_ybr", plasmaSearchRankingProcess.ybr(result.hash()));- prop.putNum("content_size", result.filesize());+ prop.putHTML("content_size", Integer.toString(result.filesize())); // we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'prop.putHTML("content_sizename", sizename(result.filesize()));+ prop.putHTML("content_host", result.url().getHost());+ prop.putHTML("content_file", result.url().getFile());+ prop.putHTML("content_path", result.url().getPath());prop.put("content_nl", (item == 0) ? 0 : 1);final TreeSet<String>[] query = theQuery.queryWords();diff --git a/htroot/yacysearchitem.json b/htroot/yacysearchitem.jsonindex a72a91891..ccbc7bd6f 100644--- a/htroot/yacysearchitem.json+++ b/htroot/yacysearchitem.json@@ -6,5 +6,8 @@"pubDate": "#[date822]#","size": "#[size]#","sizename": "#[sizename]#",- "guid": "#[urlhash]#"+ "guid": "#[urlhash]#",+ "host": "#[host]#",+ "path": "#[path]#",+ "file": "#[file]#"}#(/content)#\ No newline at end of filediff --git a/htroot/yacysearchitem.xml b/htroot/yacysearchitem.xmlindex d013a0b34..b6d022672 100644--- a/htroot/yacysearchitem.xml+++ b/htroot/yacysearchitem.xml@@ -5,5 +5,8 @@<pubDate>#[date822]#</pubDate><yacy:size>#[size]#</yacy:size><yacy:sizename>#[sizename]#</yacy:sizename>+<yacy:host>#[host]#</yacy:host>+<yacy:path>#[path]#</yacy:path>+<yacy:file>#[file]#</yacy:file><guid isPermaLink="false">#[urlhash]#</guid></item>#(/content)#\ No newline at end of filediff --git a/source/de/anomic/index/indexRepositoryReference.java b/source/de/anomic/index/indexRepositoryReference.javaindex 2e72bd7d5..9af0de5d1 100644--- a/source/de/anomic/index/indexRepositoryReference.java+++ b/source/de/anomic/index/indexRepositoryReference.java@@ -423,7 +423,7 @@ public final class indexRepositoryReference {if (format == 2) {pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");pw.println("<?xml-stylesheet type='text/xsl' href='/yacysearch.xsl' version='1.0'?>");- pw.println("<rss version=\"2.0\">");+ pw.println("<rss version=\"2.0\" xmlns:yacy=\"http://www.yacy.net/\" xmlns:opensearch=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:atom=\"http://www.w3.org/2005/Atom\">");pw.println("<channel>");pw.println("<title>YaCy Peer-to-Peer - Web-Search LURL Export</title>");pw.println("<description></description>");@@ -461,6 +461,7 @@ public final class indexRepositoryReference {if (comp.dc_creator().length() > 0) pw.println("<author>" + htmlFilterCharacterCoding.unicode2xml(comp.dc_creator(), true) + "</author>");if (comp.dc_subject().length() > 0) pw.println("<description>" + htmlFilterCharacterCoding.unicode2xml(comp.dc_subject(), true) + "</description>");pw.println("<pubDate>" + entry.moddate().toString() + "</pubDate>");+ pw.println("<yacy:size>" + entry.size() + "</yacy:size>");pw.println("<guid isPermaLink=\"false\">" + entry.hash() + "</guid>");pw.println("</item>");}