From 9049a926a511edea53f6b2622c06fcc50b96f2d7 Mon Sep 17 00:00:00 2001 From: luccioman Date: Sat, 16 Sep 2017 09:26:08 +0200 Subject: [PATCH] Restrict JS results resorting to authenticated users. Until a more efficient DOM refresh model needing less XHR requests per search is implemented. --- htroot/ConfigPortal_p.html | 2 +- htroot/yacysearch.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htroot/ConfigPortal_p.html b/htroot/ConfigPortal_p.html index e19b024a1..319cdd082 100644 --- a/htroot/ConfigPortal_p.html +++ b/htroot/ConfigPortal_p.html @@ -58,7 +58,7 @@ On demand, server-side diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 64936d062..1b8bc0c94 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -828,7 +828,7 @@ public class yacysearch { prop.put("num-results_globalresults_remoteIndexCount", Formatter.number(theSearch.remote_rwi_available.get() + theSearch.remote_solr_available.get(), true)); prop.put("num-results_globalresults_remotePeerCount", Formatter.number(theSearch.remote_rwi_peerCount.get() + theSearch.remote_solr_peerCount.get(), true)); - final boolean jsResort = global + final boolean jsResort = global && authenticated // for now enable JavaScript resorting only for authenticated users as it requires too much resources per search request && (contentdom == ContentDomain.ALL || contentdom == ContentDomain.TEXT) // For now JavaScript resorting can only be applied for text search && sb.getConfigBool(SwitchboardConstants.SEARCH_JS_RESORT, SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT); prop.put("jsResort", jsResort);