mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
do the commit anyway before calling a search interface
This commit is contained in:
parent
842faf96a2
commit
61995d508e
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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", "");
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user