Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added superfast search result computation which can be obtained for local search when snippet fetching is disabled. An example search for the rss interface would be: http://localhost:8080/yacysearch.rss?query=yacy&Enter=Search&contentdom=text&count=10&resource=local&verify=false (just add "&verify=false")

orbiter2a604b7402d8
diff --git a/htroot/Status.java b/htroot/Status.java
index 14f2a90bf..158fd161b 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -199,12 +199,11 @@ public class Status {
prop.putNum("peerStatistics_principalConnects", yacyCore.peerActions.principalConnects);
prop.putNum("peerStatistics_disconnects", yacyCore.peerActions.disconnects);
prop.put("peerStatistics_connects", yFormatter.number(sb.webIndex.seedDB.mySeed().get(yacySeed.CCOUNT, "0")));
+ thisHash = sb.webIndex.seedDB.mySeed().hash;
if (sb.webIndex.seedDB.mySeed().getPublicAddress() == null) {
- thisHash = sb.webIndex.seedDB.mySeed().hash;
prop.put("peerAddress", "0"); // not assigned + instructions
prop.put("warningGoOnline", "1");
} else {
- thisHash = sb.webIndex.seedDB.mySeed().hash;
prop.put("peerAddress", "1"); // Address
prop.put("peerAddress_address", sb.webIndex.seedDB.mySeed().getPublicAddress());
prop.putHTML("peerAddress_peername", sb.getConfig("peerName", "<nameless>").toLowerCase(), true);
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index f03770ada..ab10dd8ad 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -93,6 +93,7 @@ public class yacysearch {
// get query
String querystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim(); // SRU compliance
+ boolean fetchSnippets = post.get("verify", "true").equals("true");
final serverObjects prop = new serverObjects();
boolean rss = (post == null) ? false : post.get("rss", "false").equals("true");
@@ -269,7 +270,7 @@ public class yacysearch {
maxDistance,
prefermask,
contentdomCode,
- true,
+ fetchSnippets,
itemsPerPage,
offset,
urlmask,
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index def2ab8e1..b8f996492 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -182,7 +182,8 @@ public class yacysearchitem {
// text search for rss output
prop.put("rss", "1"); // switch on specific content
prop.putHTML("rss_title", result.title(), true);
- prop.putHTML("rss_description", result.textSnippet().getLineRaw(), true);
+ plasmaSnippetCache.TextSnippet snippet = result.textSnippet();
+ prop.putHTML("rss_description", (snippet == null) ? "" : snippet.getLineRaw(), true);
prop.putHTML("rss_link", result.urlstring(), true);
prop.put("rss_urlhash", result.hash());
prop.put("rss_date", plasmaSwitchboard.dateString822(result.modified()));
diff --git a/source/de/anomic/plasma/plasmaSearchEvent.java b/source/de/anomic/plasma/plasmaSearchEvent.java
index 8ddb708ab..bc276aa27 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 < 100) ? 1 : 0);
+ resultEntry = obtainResultEntry(uentry, 0 /*(snippetComputationAllTime < 100) ? 1 : 0*/);
if (resultEntry == null) continue; // the entry had some problems, cannot be used
urlRetrievalAllTime += resultEntry.dbRetrievalTime;
snippetComputationAllTime += resultEntry.snippetComputationTime;
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 54f587d43..ce24d2340 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -1071,7 +1071,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
**/
rankingOn = getConfig(RANKING_DIST_ON, "true").equals("true") && networkName.equals("freeworld");
rankingOwnDistribution = new plasmaRankingDistribution(log, webIndex.seedDB, new File(rankingPath, getConfig(RANKING_DIST_0_PATH, plasmaRankingDistribution.CR_OWN)), (int) getConfigLong(RANKING_DIST_0_METHOD, plasmaRankingDistribution.METHOD_ANYSENIOR), (int) getConfigLong(RANKING_DIST_0_METHOD, 0), getConfig(RANKING_DIST_0_TARGET, ""));
- rankingOtherDistribution = new plasmaRankingDistribution(log, webIndex.seedDB, new File(rankingPath, getConfig(RANKING_DIST_1_PATH, plasmaRankingDistribution.CR_OTHER)), (int) getConfigLong(RANKING_DIST_1_METHOD, plasmaRankingDistribution.METHOD_MIXEDSENIOR), (int) getConfigLong(RANKING_DIST_1_METHOD, 30), getConfig(RANKING_DIST_1_TARGET, "kaskelix.de:8080,yacy.dyndns.org:8000,suma-lab.de:8080"));
+ rankingOtherDistribution = new plasmaRankingDistribution(log, webIndex.seedDB, new File(rankingPath, getConfig(RANKING_DIST_1_PATH, plasmaRankingDistribution.CR_OTHER)), (int) getConfigLong(RANKING_DIST_1_METHOD, plasmaRankingDistribution.METHOD_MIXEDSENIOR), (int) getConfigLong(RANKING_DIST_1_METHOD, 30), getConfig(RANKING_DIST_1_TARGET, "kaskelix.de:8080,yacy.dyndns.org:8000"));
// init facility DB
/*
diff --git a/source/de/anomic/plasma/plasmaWebStructure.java b/source/de/anomic/plasma/plasmaWebStructure.java
index 536facae6..858b63c5d 100644
--- a/source/de/anomic/plasma/plasmaWebStructure.java
+++ b/source/de/anomic/plasma/plasmaWebStructure.java
@@ -47,8 +47,8 @@ public class plasmaWebStructure {
public static int maxCRLDump = 500000;
public static int maxCRGDump = 200000;
- public static int maxref = 200; // maximum number of references, to avoid overflow when a large link farm occurs (i.e. wikipedia)
- public static int maxhosts = 4000; // maximum number of hosts in web structure map
+ public static int maxref = 300; // maximum number of references, to avoid overflow when a large link farm occurs (i.e. wikipedia)
+ public static int maxhosts = 8000; // maximum number of hosts in web structure map
private StringBuffer crg; // global citation references
private serverLog log;