Skip to content

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

adjustments to granted query size

orbiter7b880d73d039
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<SortStack<ResultEntry>.stackElement> accu = null;
SearchEvent theSearch = null;
+ ArrayList<SortStack<ResultEntry>.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);