From 7b880d73d0399fff6c9dead298f06bad1e5cb87f Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 11 May 2010 23:28:43 +0000 Subject: [PATCH] adjustments to granted query size git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6868 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacy/search.java | 2 +- htroot/yacysearch.java | 2 +- source/de/anomic/search/QueryParams.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java index 14a99ede5..428e71237 100644 --- a/htroot/yacy/search.java +++ b/htroot/yacy/search.java @@ -190,8 +190,8 @@ public final class search { int indexabstractContainercount = 0; int joincount = 0; QueryParams theQuery = null; - ArrayList.stackElement> accu = null; SearchEvent theSearch = null; + ArrayList.stackElement> accu = null; if ((query.length() == 0) && (abstractSet != null)) { // this is _not_ a normal search, only a request for index abstracts Segment indexSegment = sb.indexSegments.segment(Segments.Process.PUBLIC); diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 6866fe836..9080223a8 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -166,7 +166,7 @@ public class yacysearch { // collect search attributes boolean newsearch = post.hasValue("query") && post.hasValue("former") && !post.get("query","").equalsIgnoreCase(post.get("former","")); //new search term - int itemsPerPage = Math.min((authenticated) ? 1000 : 20, post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative + int itemsPerPage = Math.min((authenticated) ? (fetchSnippets ? 100 : 1000) : (fetchSnippets ? 10 : 100), post.getInt("maximumRecords", post.getInt("count", 10))); // SRU syntax with old property as alternative int offset = (newsearch) ? 0 : post.getInt("startRecord", post.getInt("offset", 0)); boolean global = post.get("resource", "local").equals("global"); diff --git a/source/de/anomic/search/QueryParams.java b/source/de/anomic/search/QueryParams.java index d54e2d01c..da7474a9d 100644 --- a/source/de/anomic/search/QueryParams.java +++ b/source/de/anomic/search/QueryParams.java @@ -168,8 +168,8 @@ public final class QueryParams { this.ranking = ranking; this.maxDistance = maxDistance; this.contentdom = contentdom; - this.itemsPerPage = Math.min((specialRights) ? 1000 : 50, itemsPerPage); - this.offset = Math.min((specialRights) ? 10000 : 100, offset); + this.itemsPerPage = Math.min((specialRights) ? 1000 : 100, itemsPerPage); + this.offset = Math.min((specialRights) ? 10000 : 1000, offset); this.urlMask = Pattern.compile(urlMask); this.urlMask_isCatchall = this.urlMask.toString().equals(catchall_pattern.toString()); this.prefer = Pattern.compile(prefer);