Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
better calibration of caches and queue maximum sizes
Michael Peter Christen78eac8516190
diff --git a/source/net/yacy/search/index/Segment.java b/source/net/yacy/search/index/Segment.javaindex c90151822..c7e0e0183 100644--- a/source/net/yacy/search/index/Segment.java+++ b/source/net/yacy/search/index/Segment.java@@ -143,7 +143,7 @@ public class Segment {new String[] {},this,"putDocument",- 10,+ 30,null,1);}diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.javaindex 0b0af1044..e4be9ec6e 100644--- a/source/net/yacy/search/query/SearchEvent.java+++ b/source/net/yacy/search/query/SearchEvent.java@@ -99,8 +99,9 @@ import net.yacy.search.snippet.TextSnippet.ResultClass;import org.apache.solr.common.SolrDocument;public final class SearchEvent {-+private static final int max_results_rwi = 3000;+ private static final int max_results_node = 150;/*private static long noRobinsonLocalRWISearch = 0;@@ -219,7 +220,7 @@ public final class SearchEvent {this.workTables = workTables;this.query = query;this.loader = loader;- this.nodeStack = new WeakPriorityBlockingQueue<URIMetadataNode>(100, false);+ this.nodeStack = new WeakPriorityBlockingQueue<URIMetadataNode>(max_results_node, false);this.maxExpectedRemoteReferences = new AtomicInteger(0);this.expectedRemoteReferences = new AtomicInteger(0);this.excludeintext_image = Switchboard.getSwitchboard().getConfigBool("search.excludeintext.image", true);@@ -391,7 +392,7 @@ public final class SearchEvent {this.deleteIfSnippetFail = deleteIfSnippetFail;this.urlRetrievalAllTime = 0;this.snippetComputationAllTime = 0;- this.resultList = new WeakPriorityBlockingQueue<ResultEntry>(Math.max(1000, 10 * query.itemsPerPage()), true); // this is the result, enriched with snippets, ranked and ordered by ranking+ this.resultList = new WeakPriorityBlockingQueue<ResultEntry>(Math.max(max_results_node, 10 * query.itemsPerPage()), true); // this is the result, enriched with snippets, ranked and ordered by ranking// snippets do not need to match with the complete query hashes,// only with the query minus the stopwords which had not been used for the search