diff options
| author | Michael Peter Christen <mc@yacy.net> | 2013-12-04 23:15:10 +0100 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2013-12-04 23:15:10 +0100 |
| commit | 78eac851619079baa6a524050dbcc357abd02523 (patch) | |
| tree | 65bf81b582b4b509cdb271d2efb7f7e0cbe05c59 | |
| parent | da380343c2bc9c673900fc28f568474c20cf2fbb (diff) | |
better calibration of caches and queue maximum sizes
| -rw-r--r-- | source/net/yacy/search/index/Segment.java | 2 | ||||
| -rw-r--r-- | source/net/yacy/search/query/SearchEvent.java | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/net/yacy/search/index/Segment.java b/source/net/yacy/search/index/Segment.java index 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.java index 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 |
