Skip to content

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

added script that can be used to delete a single url from the index call: bin/deleteurl.sh <url>

orbiterfabda9ad3168
diff --git a/bin/deleteurl.sh b/bin/deleteurl.sh
new file mode 100755
index 000000000..4820ac185
--- /dev/null
+++ b/bin/deleteurl.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd "`dirname $0`"
+./apicall.sh "/IndexControlURLs_p.html?urlhashdeleteall=&urlstring=$1" > /dev/null
diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java
index 3ea3cb078..bd002dc17 100644
--- a/htroot/IndexControlURLs_p.java
+++ b/htroot/IndexControlURLs_p.java
@@ -129,6 +129,12 @@ public class IndexControlURLs_p {
// post values that are set on numerous input fields with same name
String urlstring = post.get("urlstring", "").trim();
String urlhash = post.get("urlhash", "").trim();
+ if (urlhash.length() == 0 && urlstring.length() > 0) {
+ try {
+ urlhash = ASCII.String(new DigestURI(urlstring, null).hash());
+ } catch (final MalformedURLException e) {
+ }
+ }
if (!urlstring.startsWith("http://") &&
!urlstring.startsWith("https://") &&