diff --git a/htroot/IndexControlRWIs_p.html b/htroot/IndexControlRWIs_p.html index 490c0f6e1..c134f315e 100644 --- a/htroot/IndexControlRWIs_p.html +++ b/htroot/IndexControlRWIs_p.html @@ -24,30 +24,9 @@ - - #(cleanup)#:: - -
-
Cleanup -
-
Index Deletion
-

- #(solr)#::
#(/solr)# -
-
-
-
-

- -
-
-
-
+ + #(limitations)#::
Limitations
@@ -61,7 +40,7 @@
- #(/cleanup)# + #(/limitations)# #(searchresult)#::

No entry for word '#[word]#'

:: diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java index 8476a67c2..1e5d01e29 100644 --- a/htroot/IndexControlRWIs_p.java +++ b/htroot/IndexControlRWIs_p.java @@ -38,15 +38,11 @@ import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.ASCII; import net.yacy.cora.document.UTF8; import net.yacy.cora.federate.yacy.CacheStrategy; -import net.yacy.cora.lod.JenaTripleStore; import net.yacy.cora.order.Base64Order; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.storage.HandleSet; import net.yacy.cora.util.SpaceExceededException; -import net.yacy.crawler.data.Cache; -import net.yacy.crawler.data.ResultURLs; import net.yacy.data.ListManager; -import net.yacy.data.WorkTables; import net.yacy.document.Condenser; import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.kelondro.data.meta.URIMetadata; @@ -81,10 +77,7 @@ public class IndexControlRWIs_p { private final static String errmsg = "not possible to compute word from hash"; - public static serverObjects respond( - @SuppressWarnings("unused") final RequestHeader header, - final serverObjects post, - final serverSwitch env) throws IOException { + public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) { // return variable that accumulates replacements final Switchboard sb = (Switchboard) env; final serverObjects prop = new serverObjects(); @@ -93,8 +86,7 @@ public class IndexControlRWIs_p { prop.putHTML("keystring", ""); prop.put("keyhash", ""); prop.put("result", ""); - prop.put("cleanup", post == null || post.containsKey("maxReferencesLimit") ? 1 : 0); - prop.put("cleanup_solr", sb.index.fulltext().connectedRemoteSolr() ? 1 : 0); + prop.put("limitations", post == null || post.containsKey("maxReferencesLimit") ? 1 : 0); // switch off all optional forms/lists prop.put("searchresult", 0); @@ -154,38 +146,6 @@ public class IndexControlRWIs_p { } } - // delete everything - if ( post.containsKey("deletecomplete") ) { - if ( post.get("deleteIndex", "").equals("on") ) { - segment.clear(); - } - if ( post.get("deleteRemoteSolr", "").equals("on")) { - try { - sb.index.fulltext().getSolr().clear(); - } catch ( final Exception e ) { - Log.logException(e); - } - } - if ( post.get("deleteCrawlQueues", "").equals("on") ) { - sb.crawlQueues.clear(); - sb.crawlStacker.clear(); - ResultURLs.clearStacks(); - } - if ( post.get("deleteTriplestore", "").equals("on") ) { - JenaTripleStore.clear(); - } - if ( post.get("deleteCache", "").equals("on") ) { - Cache.clear(); - } - if ( post.get("deleteRobots", "").equals("on") ) { - sb.robots.clear(); - } - if ( post.get("deleteSearchFl", "").equals("on") ) { - sb.tables.clear(WorkTables.TABLE_SEARCH_FAILURE_NAME); - } - post.remove("deletecomplete"); - } - // set reference limitation if ( post.containsKey("maxReferencesLimit") ) { if ( post.get("maxReferencesRadio", "").equals("on") ) { @@ -490,10 +450,8 @@ public class IndexControlRWIs_p { // insert constants prop.putNum("wcount", segment.RWICount()); - prop.put("cleanup_maxReferencesRadioChecked", ReferenceContainer.maxReferences > 0 ? 1 : 0); - prop.put("cleanup_maxReferences", ReferenceContainer.maxReferences > 0 - ? ReferenceContainer.maxReferences - : 100000); + prop.put("limitations_maxReferencesRadioChecked", ReferenceContainer.maxReferences > 0 ? 1 : 0); + prop.put("limitations_maxReferences", ReferenceContainer.maxReferences > 0 ? ReferenceContainer.maxReferences : 100000); // return rewrite properties return prop; diff --git a/htroot/IndexControlURLs_p.html b/htroot/IndexControlURLs_p.html index 0363fcc8e..d531f38d8 100644 --- a/htroot/IndexControlURLs_p.html +++ b/htroot/IndexControlURLs_p.html @@ -83,7 +83,28 @@ function updatepage(str) { - + #(cleanup)#:: +
+
Cleanup +
+
Index Deletion
+

+ #(solr)#::
#(/solr)# +
+
+
+
+

+ +
+
+
+
+ #(/cleanup)# #(statistics)#::
diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java index 4812d57e5..9258f8e77 100644 --- a/htroot/IndexControlURLs_p.java +++ b/htroot/IndexControlURLs_p.java @@ -34,8 +34,12 @@ import java.util.List; import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.ASCII; import net.yacy.cora.federate.yacy.CacheStrategy; +import net.yacy.cora.lod.JenaTripleStore; import net.yacy.cora.order.Base64Order; import net.yacy.cora.protocol.RequestHeader; +import net.yacy.crawler.data.Cache; +import net.yacy.crawler.data.ResultURLs; +import net.yacy.data.WorkTables; import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.kelondro.data.meta.URIMetadata; import net.yacy.kelondro.data.word.Word; @@ -74,6 +78,8 @@ public class IndexControlURLs_p { prop.put("dumprestore", 1); List dumpFiles = segment.fulltext().dumpFiles(); prop.put("dumprestore_dumpfile", dumpFiles.size() == 0 ? "" : dumpFiles.get(dumpFiles.size() - 1).getAbsolutePath()); + prop.put("cleanup", post == null ? 1 : 0); + prop.put("cleanup_solr", sb.index.fulltext().connectedRemoteSolr() ? 1 : 0); // show export messages final Fulltext.Export export = segment.fulltext().export(); @@ -131,6 +137,38 @@ public class IndexControlURLs_p { prop.putHTML("urlhash", urlhash); prop.put("result", " "); + // delete everything + if ( post.containsKey("deletecomplete") ) { + if ( post.get("deleteIndex", "").equals("on") ) { + segment.clear(); + } + if ( post.get("deleteRemoteSolr", "").equals("on")) { + try { + sb.index.fulltext().getSolr().clear(); + } catch ( final Exception e ) { + Log.logException(e); + } + } + if ( post.get("deleteCrawlQueues", "").equals("on") ) { + sb.crawlQueues.clear(); + sb.crawlStacker.clear(); + ResultURLs.clearStacks(); + } + if ( post.get("deleteTriplestore", "").equals("on") ) { + JenaTripleStore.clear(); + } + if ( post.get("deleteCache", "").equals("on") ) { + Cache.clear(); + } + if ( post.get("deleteRobots", "").equals("on") ) { + try {sb.robots.clear();} catch (IOException e) {} + } + if ( post.get("deleteSearchFl", "").equals("on") ) { + sb.tables.clear(WorkTables.TABLE_SEARCH_FAILURE_NAME); + } + post.remove("deletecomplete"); + } + if (post.containsKey("urlhashdeleteall")) { int i = segment.removeAllUrlReferences(urlhash.getBytes(), sb.loader, CacheStrategy.IFEXIST); prop.put("result", "Deleted URL and " + i + " references from " + i + " word indexes."); diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index d07c6e4b4..a68bbdf6a 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -30,7 +30,7 @@ diff --git a/htroot/env/templates/submenuIndexControl.template b/htroot/env/templates/submenuIndexControl.template index b125e5860..c677eb52e 100644 --- a/htroot/env/templates/submenuIndexControl.template +++ b/htroot/env/templates/submenuIndexControl.template @@ -1,8 +1,8 @@