Skip to content

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

- remove repositoryPath post from ConfigBasic (obsolete) - remove static snippetComputationTime from ResultEntry (not used)

regerb5e0f7019786
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java
index 0a3728daa..ffacc8309 100644
--- a/htroot/ConfigBasic.java
+++ b/htroot/ConfigBasic.java
@@ -228,7 +228,6 @@ public class ConfigBasic {
prop.put("setUseCase", 0);
}
prop.put("setUseCase_port", port);
- prop.put("setUseCase_repositoryPath", sb.getConfig("repositoryPath", "/DATA/HTROOT/repository"));
// check if values are proper
final boolean properPassword = (sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "").length() > 0) || sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false);
diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java
index a7e76aa02..19c66e493 100644
--- a/source/net/yacy/search/query/SearchEvent.java
+++ b/source/net/yacy/search/query/SearchEvent.java
@@ -1256,7 +1256,7 @@ public final class SearchEvent {
false);
final String solrsnippetline = solrsnippet.descriptionline(this.getQuery().getQueryGoal());
final String yacysnippetline = yacysnippet.descriptionline(this.getQuery().getQueryGoal());
- ResultEntry re = new ResultEntry(node, this.query.getSegment(), this.peers, solrsnippetline.length() > yacysnippetline.length() ? solrsnippet : yacysnippet, 0);
+ ResultEntry re = new ResultEntry(node, this.query.getSegment(), this.peers, solrsnippetline.length() > yacysnippetline.length() ? solrsnippet : yacysnippet);
addResult(re);
success = true;
} else {
@@ -1388,7 +1388,7 @@ public final class SearchEvent {
((this.query.constraint != null) && (this.query.constraint.get(Condenser.flag_cat_indexof))),
SearchEvent.SNIPPET_MAX_LENGTH,
!this.query.isLocal());
- return new ResultEntry(page, this.query.getSegment(), this.peers, snippet, 0); // result without snippet
+ return new ResultEntry(page, this.query.getSegment(), this.peers, snippet); // result without snippet
}
// load snippet
@@ -1404,21 +1404,20 @@ public final class SearchEvent {
((this.query.constraint != null) && (this.query.constraint.get(Condenser.flag_cat_indexof))),
180,
!this.query.isLocal());
- final long snippetComputationTime = System.currentTimeMillis() - startTime;
- SearchEvent.log.info("text snippet load time for " + page.url().toNormalform(true) + ": " + snippetComputationTime + ", " + (!snippet.getErrorCode().fail() ? "snippet found" : ("no snippet found (" + snippet.getError() + ")")));
+ SearchEvent.log.info("text snippet load time for " + page.url().toNormalform(true) + ": " + (System.currentTimeMillis() - startTime) + " ms, " + (!snippet.getErrorCode().fail() ? "snippet found" : ("no snippet found (" + snippet.getError() + ")")));
if (!snippet.getErrorCode().fail()) {
// we loaded the file and found the snippet
- return new ResultEntry(page, this.query.getSegment(), this.peers, snippet, snippetComputationTime); // result with snippet attached
+ return new ResultEntry(page, this.query.getSegment(), this.peers, snippet); // result with snippet attached
} else if (cacheStrategy.mustBeOffline()) {
// we did not demand online loading, therefore a failure does not mean that the missing snippet causes a rejection of this result
// this may happen during a remote search, because snippet loading is omitted to retrieve results faster
- return new ResultEntry(page, this.query.getSegment(), this.peers, null, snippetComputationTime); // result without snippet
+ return new ResultEntry(page, this.query.getSegment(), this.peers, null); // result without snippet
} else {
// problems with snippet fetch
if (this.snippetFetchWordHashes.has(Segment.catchallHash)) {
// we accept that because the word cannot be on the page
- return new ResultEntry(page, this.query.getSegment(), this.peers, null, 0);
+ return new ResultEntry(page, this.query.getSegment(), this.peers, null);
}
final String reason = "no text snippet; errorCode = " + snippet.getErrorCode();
if (this.deleteIfSnippetFail) {
@@ -1428,7 +1427,7 @@ public final class SearchEvent {
return null;
}
}
- return new ResultEntry(page, this.query.getSegment(), this.peers, null, 0); // result without snippet
+ return new ResultEntry(page, this.query.getSegment(), this.peers, null); // result without snippet
}
public ResultEntry oneResult(final int item, final long timeout) {
diff --git a/source/net/yacy/search/snippet/ResultEntry.java b/source/net/yacy/search/snippet/ResultEntry.java
index 11dc8e64d..2c20652b5 100644
--- a/source/net/yacy/search/snippet/ResultEntry.java
+++ b/source/net/yacy/search/snippet/ResultEntry.java
@@ -58,21 +58,16 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn
private final TextSnippet textSnippet;
private final Segment indexSegment;
- // statistic objects
- public long snippetComputationTime;
-
public ResultEntry(final URIMetadataNode urlentry,
final Segment indexSegment,
SeedDB peers,
- final TextSnippet textSnippet,
- final long snippetComputationTime) {
+ final TextSnippet textSnippet) {
this.urlentry = urlentry;
this.urlentry.setField(CollectionSchema.text_t.getSolrFieldName(), ""); // clear the text field which eats up most of the space; it was used for snippet computation which is in a separate field here
this.indexSegment = indexSegment;
this.alternative_urlstring = null;
this.alternative_urlname = null;
this.textSnippet = textSnippet;
- this.snippetComputationTime = snippetComputationTime;
final String host = urlentry.url().getHost();
if (host != null && host.endsWith(".yacyh")) {
// translate host into current IP