Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Faster appearance of ConfigBasic by bypassing UPNP-scan in case of existing external connects *) Marked two deprecated source-points *) Added possibility to dump words from indexing to file. Should not affect performance in the current form.
(no author)4f4d3d71ddc1
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex 527849e16..aef583fb3 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -103,7 +103,10 @@ public class ConfigBasic {// scan for Upnp routerslong begin = System.currentTimeMillis();- boolean upnpRouterFound = config.findUPnPRouter(3000);+ boolean upnpRouterFound = false;+ if (yacyCore.seedDB.mySeed.isVirgin() || yacyCore.seedDB.mySeed.isJunior()) {+ upnpRouterFound = config.findUPnPRouter(3000);+ }long end = System.currentTimeMillis();// if the upnp router scan has taken less than 3 sec, we need to waitdiff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.javaindex 5b701193f..d837ff382 100644--- a/htroot/WatchCrawler_p.java+++ b/htroot/WatchCrawler_p.java@@ -266,6 +266,7 @@ public class WatchCrawler_p {HashMap hyperlinks = (HashMap) scraper.getAnchors();// creating a crawler profile+ /* file.toURL() marked as deprecated per Sun JRE 6 */plasmaCrawlProfile.entry profile = switchboard.profiles.newEntry(fileName, file.toURL().toString(), newcrawlingfilter, newcrawlingfilter, newcrawlingdepth, newcrawlingdepth, crawlingIfOlder, crawlingDomFilterDepth, crawlingDomMaxPages, crawlingQ, indexText, indexMedia, storeHTCache, true, crawlOrder, xsstopw, xdstopw, xpstopw);// loop through the contained linksdiff --git a/source/de/anomic/net/ftpc.java b/source/de/anomic/net/ftpc.javaindex 44d537190..4ecc71423 100644--- a/source/de/anomic/net/ftpc.java+++ b/source/de/anomic/net/ftpc.java@@ -639,6 +639,7 @@ public class ftpc {}public boolean JAR() {+ /*Sun proprietary API may be removed in a future Java release*/sun.tools.jar.Main.main(shift(cmd));return true;}diff --git a/source/de/anomic/plasma/plasmaCondenser.java b/source/de/anomic/plasma/plasmaCondenser.javaindex 65d6dd31c..728503925 100644--- a/source/de/anomic/plasma/plasmaCondenser.java+++ b/source/de/anomic/plasma/plasmaCondenser.java@@ -52,6 +52,7 @@ import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;+import java.io.RandomAccessFile;import java.io.Reader;import java.io.UnsupportedEncodingException;import java.util.Enumeration;@@ -390,6 +391,21 @@ public final class plasmaCondenser {word = (new String((StringBuffer) wordenum.nextElement())).toLowerCase(); // TODO: does toLowerCase work for non ISO-8859-1 chars?//System.out.println("PARSED-WORD " + word);+ //This is useful for testing what YaCy "sees" of a website.+ if (false) {+ File f = new File("dump.txt");+ RandomAccessFile fa = null;+ try {+ fa = new RandomAccessFile(f, "rw");+ fa.seek(fa.length());+ fa.writeBytes(word);+ fa.write(160);+ fa.close();+ } catch (IOException e) {+ e.printStackTrace();+ }+ }+// distinguish punctuation and wordswordlen = word.length();if ((wordlen == 1) && (htmlFilterContentScraper.punctuation(word.charAt(0)))) {@@ -450,7 +466,7 @@ public final class plasmaCondenser {wordInSentenceCounter++;}}- // finnish last sentence+ // finish last sentenceif (sentence.length() > 0) {allsentencecounter++;sentence.insert(0, "."); // append at beginning