From abbf487023e3a45703eb63943e22f46673ea8af0 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 29 Dec 2013 20:14:10 +0100 Subject: [PATCH 1/3] fix QueryGoal Image query (missing space) see query log example .. url_file_ext_s:(jpg OR png OR gif) ORcontent_type:(image/*)) .. --- source/net/yacy/search/query/QueryGoal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/search/query/QueryGoal.java b/source/net/yacy/search/query/QueryGoal.java index 9bd4f9377..5ae21723e 100644 --- a/source/net/yacy/search/query/QueryGoal.java +++ b/source/net/yacy/search/query/QueryGoal.java @@ -345,7 +345,7 @@ public class QueryGoal { // add filter to prevent that results come from failed urls q.append(CollectionSchema.httpstatus_i.getSolrFieldName()).append(":200").append(" AND ("); q.append(CollectionSchema.images_urlstub_sxt.getSolrFieldName()).append(":[* TO *] OR "); - q.append(CollectionSchema.url_file_ext_s.getSolrFieldName()).append(":(jpg OR png OR gif) OR"); + q.append(CollectionSchema.url_file_ext_s.getSolrFieldName()).append(":(jpg OR png OR gif) OR "); q.append(CollectionSchema.content_type.getSolrFieldName()).append(":(image/*))"); // parse special requests From e03c9306e8e4066b55b7d4ec00e9d8c69eff3edb Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 29 Dec 2013 23:16:20 +0100 Subject: [PATCH 2/3] include install/uninstallYaCyWindowsService.bat as wrappers to copy --- build.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.xml b/build.xml index 108fee6e4..bd653b54d 100644 --- a/build.xml +++ b/build.xml @@ -357,6 +357,8 @@ + + From dd8ea0cdd670868a33d05b77d1c6fff671483b99 Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 30 Dec 2013 20:03:59 +0100 Subject: [PATCH 3/3] fix "add to blacklist" button style in IndexControlRWIs_p - added default filename filter to select field (as only addition to *.black list is permanent) - modified Blacklist_p header/legend to show all active blacklists (to support understanding that all configured lists are active) - removed obsolete code in Blacklist_p servlet --- htroot/Blacklist_p.html | 11 +++-- htroot/Blacklist_p.java | 43 ------------------- htroot/IndexControlRWIs_p.html | 4 +- htroot/IndexControlRWIs_p.java | 3 +- locales/de.lng | 6 +-- source/net/yacy/peers/Protocol.java | 4 +- source/net/yacy/search/query/SearchEvent.java | 2 +- 7 files changed, 17 insertions(+), 56 deletions(-) diff --git a/htroot/Blacklist_p.html b/htroot/Blacklist_p.html index dc2440f21..b12af348d 100644 --- a/htroot/Blacklist_p.html +++ b/htroot/Blacklist_p.html @@ -26,11 +26,14 @@ You may also provide your blacklist to other peers by sharing them; in return you may collect blacklist entries from other peers.

-

Active list: #(disabled)##[currentBlacklist]#::No blacklist selected#(/disabled)#

-

Used Blacklist engine: #[blacklistEngine]#

+

Active list: #(disabled)# + #{blackLists}# +  [ #[name]# ]  + #{/blackLists}# + ::No blacklist selected#(/disabled)#

- Select list: + Select list to edit: #(disabled)#
-
- +
+
diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java index 2f298d08c..7dead7440 100644 --- a/htroot/IndexControlRWIs_p.java +++ b/htroot/IndexControlRWIs_p.java @@ -58,6 +58,7 @@ import net.yacy.kelondro.util.FileUtils; import net.yacy.peers.DHTSelection; import net.yacy.peers.Protocol; import net.yacy.peers.Seed; +import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistType; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; @@ -524,7 +525,7 @@ public class IndexControlRWIs_p { prop.put("genUrlList_urlList", i); prop.putHTML("genUrlList_keyString", keystring); prop.put("genUrlList_count", i); - putBlacklists(prop, FileUtils.getDirListing(ListManager.listsPath)); + putBlacklists(prop, FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER)); } } diff --git a/locales/de.lng b/locales/de.lng index 92cee0f6a..093f41de3 100644 --- a/locales/de.lng +++ b/locales/de.lng @@ -82,9 +82,9 @@ This function provides an URL filter to the proxy; any blacklisted URL is blocke from being loaded. You can define several blacklists and activate them separately.==Sie können mehrere Blacklists anlegen und getrennt aktivieren. You may also provide your blacklist to other peers by sharing them; in return you may==Sie können ebenfalls Ihre Blacklist einem anderen Peer zum Download anbieten. collect blacklist entries from other peers.==Im Gegenzug können Sie sich selber von anderen Peers Blacklists runterladen. -Active list:==Aktivierte Liste: +Active list:==Aktive Liste(n): No blacklist selected==Keine Blacklist gewählt -Select list:==Liste auswählen: +Select list to edit:==Liste auswählen: not shared::shared==nicht freigegeben::freigegeben "select"=="wählen" Create new list:==Neue Liste anlegen: @@ -93,7 +93,7 @@ Settings for this list==Einstellungen dieser Liste "Save"=="Speichern" Share/don't share this list==Liste freigeben/nicht freigeben Delete this list==Liste löschen -Edit this list==Diese Liste bearbeiten +Edit list==Bearbeite Liste These are the domain name/path patterns in==Dies sind die Domainnamen/-pfade in Blacklist Pattern==Blacklisteintrag Edit selected pattern\(s\)==Bearbeite gewählten Eintrag diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java index 4d7534c5a..aa9619390 100644 --- a/source/net/yacy/peers/Protocol.java +++ b/source/net/yacy/peers/Protocol.java @@ -759,7 +759,7 @@ public final class Protocol { if ( urlEntry.hash().length != 12 ) { continue; // bad url hash } - if ( blacklist.isListed(BlacklistType.SEARCH, urlEntry) ) { + if ( blacklist.isListed(BlacklistType.SEARCH, urlEntry.url()) ) { if ( Network.log.isInfo() ) { Network.log.info("remote search: filtered blacklisted url " + urlEntry.url() + " from peer " + target.getName()); } @@ -1122,7 +1122,7 @@ public final class Protocol { } URIMetadataNode urlEntry = new URIMetadataNode(doc); - if ( blacklist.isListed(BlacklistType.SEARCH, urlEntry) ) { + if ( blacklist.isListed(BlacklistType.SEARCH, urlEntry.url()) ) { if ( Network.log.isInfo() ) { if (localsearch) { Network.log.info("local search (solr): filtered blacklisted url " + urlEntry.url()); diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java index 483b1aab1..f0f538cfd 100644 --- a/source/net/yacy/search/query/SearchEvent.java +++ b/source/net/yacy/search/query/SearchEvent.java @@ -1059,7 +1059,7 @@ public final class SearchEvent { } // Check for blacklist - if (Switchboard.urlBlacklist.isListed(BlacklistType.SEARCH, page)) { + if (Switchboard.urlBlacklist.isListed(BlacklistType.SEARCH, page.url())) { if (log.isFine()) log.fine("dropped RWI: url is blacklisted in url blacklist"); if (page.word().local()) this.local_rwi_available.decrementAndGet(); else this.remote_rwi_available.decrementAndGet(); continue;