Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added an option to put image links to the crawl queue and handle these like normal documents. Using this option (by default on at this moment; this might change soon) it is possible to get the exif data into the search index to be used in image search.
Michael Peter Christen69f85265e1d3
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 1e1033578..1174be8df 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -796,6 +796,11 @@ search.excludehosth=# the cases of nocache, iffresh and ifexist causes an index deletionsearch.verify.delete = true+# images may be treated either as documents that are shown in search results or as objects+# that are only visible in special search environments, like image search+search.excludeintext.image = true+crawler.load.image = true;+# remote search detailsremotesearch.maxcount = 10remotesearch.maxtime = 3000diff --git a/source/net/yacy/crawler/CrawlStacker.java b/source/net/yacy/crawler/CrawlStacker.javaindex 0351f0620..4c3cd42dc 100644--- a/source/net/yacy/crawler/CrawlStacker.java+++ b/source/net/yacy/crawler/CrawlStacker.java@@ -336,9 +336,10 @@ public final class CrawlStacker {// check availability of parser and maxfilesizeString warning = null;+ boolean loadImages = Switchboard.getSwitchboard().getConfigBool("crawler.load.image", true);if ((maxFileSize >= 0 && entry.size() > maxFileSize) ||entry.url().getContentDomain() == ContentDomain.APP ||- entry.url().getContentDomain() == ContentDomain.IMAGE ||+ (!loadImages && entry.url().getContentDomain() == ContentDomain.IMAGE) ||entry.url().getContentDomain() == ContentDomain.AUDIO ||entry.url().getContentDomain() == ContentDomain.VIDEO ||entry.url().getContentDomain() == ContentDomain.CTRL) {diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex dc0fc71ed..07689f518 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -2512,10 +2512,12 @@ public final class Switchboard extends serverSwitch {) {// get the hyperlinksfinal Map<DigestURI, String> hl = Document.getHyperlinks(documents);+ boolean loadImages = getConfigBool("crawler.load.image", true);+ if (loadImages) hl.putAll(Document.getImagelinks(documents));// add all media links also to the crawl stack. They will be re-sorted to the NOLOAD queue and indexed afterwards as pure linksif (response.profile().directDocByURL()) {- hl.putAll(Document.getImagelinks(documents));+ if (!loadImages) hl.putAll(Document.getImagelinks(documents));hl.putAll(Document.getApplinks(documents));hl.putAll(Document.getVideolinks(documents));hl.putAll(Document.getAudiolinks(documents));