*) added site operator which can be used to only show results from a certain domain. example: "test site:edu" shows only documents which contain the word test and which come from an edu domain

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5439 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 16 years ago
parent 19e7c56f7f
commit 9e58ae036d

@ -212,7 +212,15 @@ public class yacysearch {
if (ftb == -1) ftb = querystring.length(); if (ftb == -1) ftb = querystring.length();
String ft = querystring.substring(filetype + 9, ftb); String ft = querystring.substring(filetype + 9, ftb);
query[0].remove("filetype:" + ft.toLowerCase()); query[0].remove("filetype:" + ft.toLowerCase());
urlmask = ".*." + ft; urlmask = ".*\\." + ft;
}
int site = querystring.indexOf("site:");
if (site >= 0) {
int ftb = querystring.indexOf(' ', site);
if (ftb == -1) ftb = querystring.length();
String domain = querystring.substring(site + 5, ftb);
query[0].remove("site:" + domain.toLowerCase());
urlmask = ".*\\." + domain + "/.*";
} }
// read the language from the language-restrict option 'lr' // read the language from the language-restrict option 'lr'

Loading…
Cancel
Save