*) r 5512 has introduced a bug which resulted in useless filters if site:, filtetype:, or inurl: was used since the filters included the word "null".

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5517 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 16 years ago
parent aaafe05c02
commit 80e6356860

@ -232,7 +232,13 @@ public class yacysearch {
String ft = querystring.substring(filetype + 9, ftb);
query[0].remove("filetype:" + ft.toLowerCase());
while(ft.startsWith(".")) ft = ft.substring(1);
if(ft.length() > 0) urlmask = urlmask + ".*\\." + ft;
if(ft.length() > 0) {
if (urlmask == null) {
urlmask = ".*\\." + ft;
} else {
urlmask = urlmask + ".*\\." + ft;
}
}
}
int site = querystring.indexOf("site:");
if (site >= 0) {
@ -242,7 +248,13 @@ public class yacysearch {
query[0].remove("site:" + domain.toLowerCase());
while(domain.startsWith(".")) domain = domain.substring(1);
if (domain.indexOf(".") < 0) domain = "\\." + domain; // is tld
if (domain.length() > 0) urlmask = "[a-zA-Z]*://[^/]*" + domain + "/.*" + urlmask;
if (domain.length() > 0) {
if (urlmask == null) {
urlmask = "[a-zA-Z]*://[^/]*" + domain + "/.*";
} else {
urlmask = "[a-zA-Z]*://[^/]*" + domain + "/.*" + urlmask;
}
}
}
if (urlmask == null){
if (post.containsKey("urlmask") && post.get("urlmask").equals("no")) { // option search all

Loading…
Cancel
Save