Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
do the commit anyway before calling a search interface
Michael Peter Christen61995d508e72
diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.javaindex 537a22c48..7968d6a3e 100644--- a/htroot/HostBrowser.java+++ b/htroot/HostBrowser.java@@ -84,7 +84,7 @@ public class HostBrowser {}String path = post == null ? "" : post.get("path", "").trim();- if (admin && path.length() == 0 && sb.crawler.getActiveSize() > 0) sb.index.fulltext().commit();+ if (admin && path.length() == 0) sb.index.fulltext().commit();if (post == null || env == null) {return prop;}diff --git a/htroot/index.java b/htroot/index.javaindex 7a1a8c45a..79ad68e05 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -62,7 +62,7 @@ public class index {}}- if (authorizedAccess && sb.crawler.getActiveSize() > 0) {+ if (authorizedAccess) {sb.index.fulltext().commit(); // call this only as superuser to prevent that this can be misused for DoS}diff --git a/htroot/yacyinteractive.java b/htroot/yacyinteractive.javaindex c513abea5..27b794fd8 100644--- a/htroot/yacyinteractive.java+++ b/htroot/yacyinteractive.java@@ -48,7 +48,9 @@ public class yacyinteractive {prop.put("promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));final boolean admin = sb.verifyAuthentication(header);- if (admin && sb.crawler.getActiveSize() > 0) sb.index.fulltext().commit();+ if (admin) {+ sb.index.fulltext().commit();+ }final String query = (post == null) ? "" : post.get("query", "");final String startRecord = (post == null) ? "0" : post.get("startRecord", "");diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 31fa9545a..7dc4a8b3f 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -116,7 +116,7 @@ public class yacysearch {final String originalquerystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim();String querystring = originalquerystring.replace('+', ' ').replace('*', ' ').trim();CacheStrategy snippetFetchStrategy = (post == null) ? null : CacheStrategy.parse(post.get("verify", "cacheonly"));- if (authenticated && originalquerystring.length() == 0 && sb.crawler.getActiveSize() > 0) sb.index.fulltext().commit();+ if (authenticated && originalquerystring.length() == 0) sb.index.fulltext().commit();final servletProperties prop = new servletProperties();prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);