added new Host Browser to main menu:

this new search interface is something completely new for search, but
completely common on desktops: browser a web space like one would browse
a file system in a file browser. The file listing is created using the
search index and a faceted restriction to specific domains.
pull/1/head
Michael Peter Christen 13 years ago
parent 8556a3d521
commit f45f7fc12e

@ -178,10 +178,10 @@ h6_txt
#inboundlinks_tag_txt
## internal links, only the protocol
#inboundlinks_protocol_sxt
inboundlinks_protocol_sxt
## internal links, the url only without the protocol
#inboundlinks_urlstub_txt
inboundlinks_urlstub_txt
## internal links, the name property of the a-tag
#inboundlinks_name_txt
@ -208,10 +208,10 @@ h6_txt
#outboundlinks_tag_txt
## external links, only the protocol
#outboundlinks_protocol_sxt
outboundlinks_protocol_sxt
## external links, the url only without the protocol
#outboundlinks_urlstub_txt
outboundlinks_urlstub_txt
## external links, the name property of the a-tag
#outboundlinks_name_txt
@ -325,7 +325,7 @@ host_s
#host_dnc_s
## either the second level domain or, if a ccSLD is used, the third level domain
#host_organization_s
host_organization_s
## the organization and dnc concatenated with '.'
#host_organizationdnc_s

@ -8,7 +8,7 @@
//<![CDATA[
function xmlhttpPost() {
var searchform = document.getElementById('searchform');
search(searchform.urlstring.value);
search(searchform.path.value);
}
function search(query) {
@ -20,7 +20,7 @@ function search(query) {
else if (window.ActiveXObject) { // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('GET', "/solr/select?q=sku:\"" + query + "\" OR host_s:\"" + query + "\" OR host_dnc_s:\"" + query + "\" OR host_organization_s:\"" + query + "\" OR host_organizationdnc_s:\"" + query + "\" OR host_subdomain_s:\"" + query + "\"&start=0&rows=100&wt=json", true);
self.xmlHttpReq.open('GET', "/solr/select?q=sku:\"" + query + "\" OR host_s:\"" + query + "\" OR host_dnc_s:\"" + query + "\" OR host_organization_s:\"" + query + "\" OR host_organizationdnc_s:\"" + query + "\" OR host_subdomain_s:\"" + query + "\" OR url_paths_sxt:\"" + query + "\"&start=0&rows=100&wt=yjson", true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
@ -32,7 +32,7 @@ function search(query) {
function updatepage(str) {
var raw = document.getElementById("raw");
if (raw != null) raw.innerHTML = str;
//if (raw != null) raw.innerHTML = str;
var rsp = eval("("+str+")");
var firstChannel = rsp.channels[0];
var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
@ -49,7 +49,7 @@ function updatepage(str) {
html += "<td>URL from index (total results = " + totalResults + ")<\/td>";
for (var i = 0; i < firstChannel.items.length; i++) {
item = firstChannel.items[i];
html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"HostBrowser.html?urlstringsearch=&amp;urlstring=" + item.link + "\">" + item.link + "<\/a><\/td>";
html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"HostBrowser.html?pathsearch=&amp;path=" + item.link + "\">" + item.link + "<\/a><\/td>";
}
html += "<\/table>";
}
@ -60,58 +60,62 @@ function updatepage(str) {
</head>
<body id="IndexControl">
#%env/templates/header.template%#
#%env/templates/submenuIndexControl.template%#
<h2>URL References Administration</h2>
<p>The local index currently contains #[ucount]# URL references</p>
<form action="HostBrowser.html" id="searchform" method="post" enctype="multipart/form-data" accept-charset="UTF-8" onkeyup="xmlhttpPost(); return false;">
<fieldset><legend>URL Retrieval</legend>
<dl>
<dt class="TableCellDark">Retrieve by URL:</dt>
<dd><input type="text" name="urlstring" value="#[urlstring]#" size="40" maxlength="250" />
<input type="submit" name="urlstringsearch" value="Show Details for URL" class="submitready" style="width:240px;"/><br />
<div id="searchresults"></div>
</dd>
</dl>
<h2>Host Browser</h2>
<p>Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or select one of a <a href="/HostBrowser.html?hosts=">list of hosts.</a></p>
<form action="HostBrowser.html" id="searchform" method="get" onkeyup="xmlhttpPost(); return false;">
<fieldset class="yacys">
Host/URL:
<input id="search" type="text" name="path" value="#[path]#" size="40" maxlength="250" />
<input type="submit" name="list" value="Browse Host" class="submitready" style="width:240px;"/><br />
<div id="searchresults">
</fieldset>
</form>
<div id="raw"></div>
#[result]#
#(statisticslines)#::
<p><em>Statistics about the top-#[domains]# domains in the database:</em></p>
<table cellpadding="2" cellspacing="1" >
<tr class="TableHeader">
<td><strong>Domain</strong></td>
<td><strong>URLs</strong></td>
</tr>
#{domains}#
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
<td><a href="http://#[domain]#/" target="_blank">#[domain]#</a></td>
<td>#[count]#</td>
</tr>
#{/domains}#
</table>
#(/statisticslines)#
#(genUrlProfile)#
::No entry found for URL-hash #[urlhash]#
::<iframe src="/api/yacydoc.html?urlhash=#[urlhash]#" width="100%" height="420" frameborder="0" scrolling="no"></iframe><br />
<div id="api">
<a href="/api/yacydoc.html?urlhash=#[urlhash]#">
<img src="env/grafics/api.png" width="60" height="40" alt="API" /></a>
<span>These document details can be retrieved as <a href="http://www.w3.org/TR/xhtml-rdfa-primer/">XHTML+RDFa</a>
document containg <a href="http://www.w3.org/RDF/">RDF</a> annotations in <a href="http://dublincore.org/">Dublin Core</a> vocabulary.
The XHTML+RDFa data format is both a XML content format and a HTML display format and is considered as an important <a href="http://www.w3.org/2001/sw/">Semantic Web</a> content format.
The same content can also be retrieved as pure <a href="/api/yacydoc.xml?urlhash=#[urlhash]#">XML metadata</a> with DC tag name vocabulary.
Click the API icon to see an example call to the search rss API.
To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de/wiki/index.php/Dev:API">API wiki page</a>.</span>
</div>
#(/genUrlProfile)#
#(hosts)#::
<fieldset><legend>Host List</legend>
#{list}#
<div style="float:left; padding:1px 5px 1px 5px;">
<div style="width:160px; text-align:left; float: left; white-space:nowrap; overflow:hidden;"><a href="/HostBrowser.html?path=#[host]#">#[host]#</a></div>
<div style="width:80px; text-align:right; float: left; white-space:nowrap; overflow:hidden;">#[count]# URLs</div>
</div>
#{/list}#
</fieldset>
#(/hosts)#
#[result]#
#(files)#::
<fieldset><legend>Files in #[path]#</legend>
<p>Documents in domain: #[hostsize]#; Documents in subpath: #[subpathsize]#</p>
<table border="0" cellpadding="2" cellspacing="2" style="float:left">
<tr>
<th align="center" width="32"></th>
<th align="left" width="600">Path</th>
<th align="right" width="80" >Documents</th>
</tr>
#(root)#
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
<td align="center"></td>
<td align="left" nowrap ><a href="/HostBrowser.html?path=#[path]#">..</a></td>
<td align="right" nowrap></td>
</tr>::
#(/root)#
#{list}#
#(type)#
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
<td align="center"><img src="/env/grafics/doc.gif"/></td>
<td align="left" nowrap #(stored)#class="error"::#(/stored)# colspan="2">#[file]#</td>
</tr>::
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
<td align="center"><img src="/env/grafics/dir.gif"/></td>
<td align="left" nowrap ><a href="/HostBrowser.html?path=#[file]#">#[file]#</a></td>
<td align="right" nowrap>#[count]#</td>
</tr>
#(/type)#
#{/list}#
</table>
</fieldset>
#(/files)#
#%env/templates/footer.template%#
</body>

@ -1,107 +1,197 @@
/**
* HostBrowser
* Copyright 2012 by Michael Peter Christen, mc@yacy.net, Frankfurt am Main, Germany
* First released 27.09.2012 at http://yacy.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program in the file lgpl21.txt
* If not, see <http://www.gnu.org/licenses/>.
*/
import java.net.MalformedURLException;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.atomic.AtomicInteger;
import net.yacy.cora.document.ASCII;
import org.apache.solr.common.SolrDocument;
import net.yacy.cora.document.MultiProtocolURI;
import net.yacy.cora.federate.solr.YaCySchema;
import net.yacy.cora.federate.solr.connector.AbstractSolrConnector;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.data.meta.URIMetadata;
import net.yacy.kelondro.data.word.Word;
import net.yacy.cora.sorting.ReversibleScoreMap;
import net.yacy.kelondro.logging.Log;
import net.yacy.search.Switchboard;
import net.yacy.search.index.Segment;
import net.yacy.search.index.Fulltext;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
public class HostBrowser {
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final Switchboard sb = (Switchboard) env;
Fulltext fulltext = sb.index.fulltext();
final boolean searchAllowed = sb.getConfigBool("publicSearchpage", true) || sb.verifyAuthentication(header);
final serverObjects prop = new serverObjects();
Segment segment = sb.index;
// set default values
prop.put("urlstring", "");
prop.put("urlhash", "");
prop.put("path", "");
prop.put("result", "");
prop.putNum("ucount", segment.fulltext().size());
prop.put("otherHosts", "");
prop.put("genUrlProfile", 0);
prop.put("statistics", 1);
prop.put("statistics_lines", 100);
prop.put("statisticslines", 0);
prop.putNum("ucount", fulltext.size());
prop.put("hosts", 0);
prop.put("files", 0);
if (!searchAllowed) {
prop.put("result", "You are not allowed to use this page. Please ask an administrator for permission.");
return prop;
}
if (post == null || env == null) {
return prop; // nothing to do
return prop;
}
// post values that are set on numerous input fields with same name
String urlstring = post.get("urlstring", "").trim();
String path = post.get("path", "").trim();
int p = path.lastIndexOf('/');
if (p < 0 && path.length() > 0) path = path + "/"; else if (p > 7) path = path.substring(0, p + 1); // the search path shall always end with "/"
if (path.length() > 0 && (
!path.startsWith("http://") &&
!path.startsWith("https://") &&
!path.startsWith("ftp://") &&
!path.startsWith("smb://") &&
!path.startsWith("file://"))) { path = "http://" + path; }
prop.putHTML("path", path);
if (!urlstring.startsWith("http://") &&
!urlstring.startsWith("https://") &&
!urlstring.startsWith("ftp://") &&
!urlstring.startsWith("smb://") &&
!urlstring.startsWith("file://")) { urlstring = "http://" + urlstring; }
prop.putHTML("urlstring", urlstring);
prop.put("result", " ");
if (post.containsKey("hosts")) {
// generate host list
try {
int maxcount = 200;
ReversibleScoreMap<String> score = fulltext.getSolr().getFacet(YaCySchema.host_s.name(), maxcount);
int c = 0;
Iterator<String> i = score.keys(false);
String host;
while (i.hasNext() && c < maxcount) {
host = i.next();
prop.put("hosts_list_" + c + "_host", host);
prop.put("hosts_list_" + c + "_count", score.get(host));
c++;
}
prop.put("hosts_list", c);
prop.put("hosts", 1);
} catch (IOException e) {
Log.logException(e);
}
}
if (path.length() > 0) {
if (post.containsKey("urlstringsearch")) {
p = path.substring(0, path.length() - 1).lastIndexOf('/');
if (p < 8) {
prop.put("files_root", 1);
} else {
prop.put("files_root", 0);
prop.put("files_root_path", path.substring(0, p + 1));
}
try {
final DigestURI url = new DigestURI(urlstring);
String urlhash = ASCII.String(url.hash());
prop.put("urlhash", urlhash);
final URIMetadata entry = segment.fulltext().getMetadata(ASCII.getBytes(urlhash));
if (entry == null) {
prop.putHTML("result", "No Entry for URL " + url.toNormalform(true, true));
prop.putHTML("urlstring", urlstring);
prop.put("urlhash", "");
} else {
prop.putAll(genUrlProfile(segment, entry, urlhash));
prop.put("statistics", 0);
// generate file list from path
MultiProtocolURI uri = new MultiProtocolURI(path);
String host = uri.getHost();
// get all files for a specific host from the index
BlockingQueue<SolrDocument> docs = fulltext.getSolr().concurrentQuery(YaCySchema.host_s.name() + ":" + host, 0, 100000, 60000);
SolrDocument doc;
Set<String> storedDocs = new HashSet<String>();
Set<String> linkedDocs = new HashSet<String>();
int hostsize = 0;
while ((doc = docs.take()) != AbstractSolrConnector.POISON_DOCUMENT) {
String u = (String) doc.getFieldValue(YaCySchema.sku.name());
hostsize++;
if (u.startsWith(path)) storedDocs.add(u);
Collection<Object> urlprot = doc.getFieldValues(YaCySchema.inboundlinks_protocol_sxt.name());
Collection<Object> urlstub = doc.getFieldValues(YaCySchema.inboundlinks_urlstub_txt.name());
if (urlprot != null && urlstub != null) {
assert urlprot.size() == urlstub.size();
Object[] urlprota = urlprot.toArray();
Object[] urlstuba = urlstub.toArray();
for (int i = 0; i < urlprota.length; i++) {
u = ((String) urlprota[i]) + "://" + ((String) urlstuba[i]);
if (u.startsWith(path) && !storedDocs.contains(u)) linkedDocs.add(u);
}
}
}
// now combine both lists into one
Map<String, Boolean> files = new HashMap<String, Boolean>();
for (String u: storedDocs) files.put(u, true);
for (String u: linkedDocs) if (!storedDocs.contains(u)) files.put(u, false);
// distinguish files and folders
Map<String, Object> list = new TreeMap<String, Object>();
for (String url: files.keySet()) {
String file = url.substring(path.length());
p = file.indexOf('/');
if (p < 0) {
// this is a file in the root path
list.put(url, files.get(url)); // Boolean value: this is a file
} else {
// this is a directory path
String dir = path + file.substring(0, p + 1);
Object c = list.get(dir);
if (c == null) {
list.put(dir, new AtomicInteger(1));
} else if (c instanceof AtomicInteger) {
((AtomicInteger) c).incrementAndGet();
}
}
}
int maxcount = 1000;
int c = 0;
for (Map.Entry<String, Object> entry: list.entrySet()) {
if (entry.getValue() instanceof Boolean) {
// this is a file
prop.put("files_list_" + c + "_type", 0);
prop.put("files_list_" + c + "_type_file", entry.getKey());
prop.put("files_list_" + c + "_type_stored", ((Boolean) entry.getValue()).booleanValue() ? 1 : 0);
} else {
// this is a folder
prop.put("files_list_" + c + "_type", 1);
prop.put("files_list_" + c + "_type_file", entry.getKey());
prop.put("files_list_" + c + "_type_count", ((AtomicInteger) entry.getValue()).intValue());
}
if (++c >= maxcount) break;
}
} catch (final MalformedURLException e) {
prop.putHTML("result", "bad url: " + urlstring);
prop.put("urlhash", "");
prop.put("files_list", c);
prop.putHTML("files_path", path);
prop.put("files_hostsize", hostsize);
prop.put("files_subpathsize", storedDocs.size());
prop.put("files", 1);
} catch (Throwable e) {
Log.logException(e);
}
prop.put("lurlexport", 0);
}
// insert constants
prop.putNum("ucount", segment.fulltext().size());
prop.putNum("ucount", fulltext.size());
// return rewrite properties
return prop;
}
private static serverObjects genUrlProfile(final Segment segment, final URIMetadata entry, final String urlhash) {
final serverObjects prop = new serverObjects();
if (entry == null) {
prop.put("genUrlProfile", "1");
prop.put("genUrlProfile_urlhash", urlhash);
return prop;
}
final URIMetadata le = (entry.referrerHash() == null || entry.referrerHash().length != Word.commonHashLength) ? null : segment.fulltext().getMetadata(entry.referrerHash());
if (entry.url() == null) {
prop.put("genUrlProfile", "1");
prop.put("genUrlProfile_urlhash", urlhash);
return prop;
}
prop.put("genUrlProfile", "2");
prop.putHTML("genUrlProfile_urlNormalform", entry.url().toNormalform(false, true));
prop.put("genUrlProfile_urlhash", urlhash);
prop.put("genUrlProfile_urlDescr", entry.dc_title());
prop.put("genUrlProfile_moddate", entry.moddate().toString());
prop.put("genUrlProfile_loaddate", entry.loaddate().toString());
prop.put("genUrlProfile_referrer", (le == null) ? 0 : 1);
prop.putHTML("genUrlProfile_referrer_url", (le == null) ? "<unknown>" : le.url().toNormalform(false, true));
prop.put("genUrlProfile_referrer_hash", (le == null) ? "" : ASCII.String(le.hash()));
prop.put("genUrlProfile_doctype", String.valueOf(entry.doctype()));
prop.put("genUrlProfile_language", entry.language());
prop.put("genUrlProfile_size", entry.size());
prop.put("genUrlProfile_wordCount", entry.wordCount());
return prop;
}
}

@ -7,7 +7,7 @@
$(function() {
$("select").each(function(){
var name = $(this).attr("name");
$("<div name='"+name+"' id='slider_"+name+"'></div>").insertAfter($(this)).slider({
$("<div style='width:360px; float:left; display: inline;' name='"+name+"' id='slider_"+name+"'></div>").insertAfter($(this)).slider({
min: 0,
max: 15,
range: "min",
@ -38,8 +38,8 @@
<legend>Pre-Ranking</legend>
<dl>#{attrPre}#
<dt style="width:260px"><label for="#[nameorg]#">#[name]#</label>&nbsp;<span class="info" style="float:right"><img src="/env/grafics/i16.gif" width="16" height="16" alt="info"/><span>#[info]#</span></span></dt>
<dd style="width:360px" id="#[nameorg]#">
<select name="#[nameorg]#">#{select}#
<dd style="width:360px; float:left; display:inline;" id="#[nameorg]#">
<select style="float:left; display:inline;" name="#[nameorg]#">#{select}#
<option value="#[value]#" #(checked)#:: selected="selected"#(/checked)#>#[value]#</option>#{/select}#
</select>
</dd>#{/attrPre}#

@ -9,6 +9,7 @@
<ul class="menu">
<li><a href="/index.html" accesskey="s" class="MenuItemLink">Web Search</a></li>
<li><a href="/yacyinteractive.html" class="MenuItemLink">File Search</a></li>
<li><a href="/HostBrowser.html" class="MenuItemLink">Host Browser</a></li>
<li><a href="/yacysearch_location.html" class="MenuItemLink">Location Search</a></li>
<li><a href="/solr/select?q=*:*&start=0&rows=3" class="MenuItemLink">Embedded Solr API</a></li>
<!--<li><a href="/yacy/ui/" accesskey="s" class="MenuItemLink">Rich Client Search</a></li>-->

@ -881,14 +881,14 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
return CharType.high;
}
public String toNormalform(final boolean excludeReference, final boolean stripAmp) {
return toNormalform(excludeReference, stripAmp, false);
public String toNormalform(final boolean excludeAnchor, final boolean stripAmp) {
return toNormalform(excludeAnchor, stripAmp, false);
}
private static final Pattern ampPattern = Pattern.compile("&amp;");
private static final Pattern ampPattern = Pattern.compile(Pattern.quote("&amp;"));
public String toNormalform(final boolean excludeReference, final boolean stripAmp, final boolean removeSessionID) {
String result = toNormalform0(excludeReference, removeSessionID);
public String toNormalform(final boolean excludeAnchor, final boolean stripAmp, final boolean removeSessionID) {
String result = toNormalform0(excludeAnchor, removeSessionID);
if (stripAmp) {
Matcher matcher = ampPattern.matcher(result);
while (matcher.find()) {
@ -899,7 +899,7 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
return result;
}
private String toNormalform0(final boolean excludeReference, final boolean removeSessionID) {
private String toNormalform0(final boolean excludeAnchor, final boolean removeSessionID) {
// generates a normal form of the URL
boolean defaultPort = false;
if (this.protocol.equals("mailto")) {
@ -915,17 +915,17 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
} else if (isFile()) {
defaultPort = true;
}
final String urlPath = this.getFile(excludeReference, removeSessionID);
final StringBuilder u = new StringBuilder(80);
final String urlPath = this.getFile(excludeAnchor, removeSessionID);
String h = getHost();
final StringBuilder u = new StringBuilder(20 + urlPath.length() + ((h == null) ? 0 : h.length()));
u.append(this.protocol);
u.append("://");
if (getHost() != null) {
if (h != null) {
if (this.userInfo != null) {
u.append(this.userInfo);
u.append("@");
}
final String hl = getHost().toLowerCase();
u.append(hl);
u.append(h.toLowerCase());
}
if (!defaultPort) {
u.append(":");
@ -961,7 +961,13 @@ public class MultiProtocolURI implements Serializable, Comparable<MultiProtocolU
@Override
public int compareTo(final MultiProtocolURI h) {
return toString().compareTo(h.toString());
int c;
if (this.protocol != null && h.protocol != null && (c = this.protocol.compareTo(h.protocol)) != 0) return c;
if (this.host != null && h.host != null && (c = this.host.compareTo(h.host)) != 0) return c;
if (this.userInfo != null && h.userInfo != null && (c = this.userInfo.compareTo(h.userInfo)) != 0) return c;
if (this.path != null && h.path != null && (c = this.path.compareTo(h.path)) != 0) return c;
if (this.searchpart != null && h.searchpart != null && (c = this.searchpart.compareTo(h.searchpart)) != 0) return c;
return toNormalform(true, true).compareTo(h.toNormalform(true, true));
}
public boolean isPOST() {

@ -274,8 +274,9 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
// query the server
QueryResponse rsp = query(params);
FacetField facet = rsp.getFacetField(field);
List<Count> values = facet.getValues();
ReversibleScoreMap<String> result = new ClusteredScoreMap<String>(UTF8.insensitiveUTF8Comparator);
List<Count> values = facet.getValues();
if (values == null) return result;
for (Count ff: values) result.set(ff.getName(), (int) ff.getCount());
return result;
}

@ -394,8 +394,11 @@ public final class Switchboard extends serverSwitch
solrScheme.fill(backupScheme, true);
// switch on some fields which are necessary for ranking and faceting
for (YaCySchema field: new YaCySchema[]{
YaCySchema.url_file_ext_s, YaCySchema.last_modified,
YaCySchema.url_paths_sxt, YaCySchema.host_organization_s
YaCySchema.host_s,
YaCySchema.url_file_ext_s, YaCySchema.last_modified, // needed for media search and /date operator
YaCySchema.url_paths_sxt, YaCySchema.host_organization_s, // needed to search in the url
YaCySchema.inboundlinks_protocol_sxt, YaCySchema.inboundlinks_urlstub_txt, // needed for HostBrowser
YaCySchema.outboundlinks_protocol_sxt, YaCySchema.outboundlinks_urlstub_txt // needed to enhance the crawler
}) {
ConfigurationSet.Entry entry = solrScheme.get(field.name()); entry.setEnable(true); solrScheme.put(field.name(), entry);
}

Loading…
Cancel
Save