Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
optimize surftip data load, double load (index, loader) not neccessary, getMetadata already suficient + lng file adjustments
reger8c9684cc4537
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex a5c87b63b..f00bba375 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -556,31 +556,18 @@ public class yacysearch {}final String recommendHash = post.get("recommendref", ""); // urlhashfinal URIMetadataNode urlentry = indexSegment.fulltext().getMetadata(UTF8.getBytes(recommendHash));- if ( urlentry != null ) {- Document[] documents = null;- try {- documents =- sb.loader.loadDocuments(- sb.loader.request(urlentry.url(), true, false),- CacheStrategy.IFEXIST,- Integer.MAX_VALUE, BlacklistType.SEARCH, ClientIdentification.yacyIntranetCrawlerAgent);- } catch (final IOException e ) {- } catch (final Parser.Failure e ) {- }- if ( documents != null ) {- // create a news message- final Map<String, String> map = new HashMap<String, String>();- map.put("url", urlentry.url().toNormalform(true).replace(',', '|'));- map.put("title", urlentry.dc_title().replace(',', ' '));- map.put("description", documents[0].dc_title().replace(',', ' '));- map.put("author", documents[0].dc_creator());- map.put("tags", documents[0].dc_subject(' '));- sb.peers.newsPool.publishMyNews(+ if (urlentry != null) {+ // create a news message+ final Map<String, String> map = new HashMap<String, String>();+ map.put("url", urlentry.url().toNormalform(true).replace(',', '|'));+ map.put("title", urlentry.dc_title().replace(',', ' '));+ map.put("description", urlentry.getDescription().isEmpty() ? urlentry.dc_title().replace(',', ' ') : urlentry.getDescription().get(0).replace(',', ' '));+ map.put("author", urlentry.dc_creator());+ map.put("tags", urlentry.dc_subject().replace(',', ' '));+ sb.peers.newsPool.publishMyNews(sb.peers.mySeed(),NewsPool.CATEGORY_SURFTIPP_ADD,map);- documents[0].close();- }}}diff --git a/locales/de.lng b/locales/de.lngindex 83e40c65a..c2bc4c1bb 100644--- a/locales/de.lng+++ b/locales/de.lng@@ -3893,6 +3893,7 @@ Content Control==Inhaltskontrolle>Published News<==>Veröffentlichte Nachrichten<## Community Data Submenu>Community Data<==>Gemeinschaftsdaten<+>Surftips<==>Surftipps<>Local Peer Wiki<==>Lokales Peer Wiki<#-----------------------------diff --git a/locales/fr.lng b/locales/fr.lngindex 0ec5bb3f6..d34f56485 100644--- a/locales/fr.lng+++ b/locales/fr.lng@@ -2226,7 +2226,7 @@ Processed News==Nouvelles traitéesOutgoing News==Nouvelles sortantesPublished News==Nouvelles publiéesCommunity Data==Données communes-Surftips==Astuces de navigation+>Surftips<==>Astuces de navigation<Local Peer Wiki==Wiki du noeud local#---------------------------