diff options
| author | orbiter <mc@yacy.net> | 2013-06-09 12:12:34 +0200 |
|---|---|---|
| committer | orbiter <mc@yacy.net> | 2013-06-09 12:12:34 +0200 |
| commit | 2b320313d9b31db92d686d2c18fbde7418480b3a (patch) | |
| tree | ad597e95a34fe850fd2fee40fb41c12fa5c011a3 /htroot | |
| parent | 200769d0c61313f5598d260bdd1034ba881a6d89 (diff) | |
replaced yacydoc servlet usage by a solr result output using an html
output writer. This made the creation of a html result writer necessary
which is included in this commit. The yacydoc servlet was used to
present all metadata to a document, but the solr interface can serve for
this purpose in a much better way. All usages (instead one) of yacydoc
were replaced by a solr call. This affects also the 'metadata' link
attached to search results.
Diffstat (limited to 'htroot')
| -rw-r--r-- | htroot/ConfigSearchPage_p.html | 2 | ||||
| -rw-r--r-- | htroot/IndexControlURLs_p.html | 4 | ||||
| -rw-r--r-- | htroot/ViewFile.html | 29 | ||||
| -rw-r--r-- | htroot/solr/select.java | 4 | ||||
| -rw-r--r-- | htroot/yacysearchitem.html | 2 |
5 files changed, 12 insertions, 29 deletions
diff --git a/htroot/ConfigSearchPage_p.html b/htroot/ConfigSearchPage_p.html index 613fcddad..d86c07b5b 100644 --- a/htroot/ConfigSearchPage_p.html +++ b/htroot/ConfigSearchPage_p.html @@ -177,7 +177,7 @@ $(function() { <td width="15px"></td> <td>#[content_showDate_date]#</td> <td> | 42 kbyte</td> - <td> | <a href="api/yacydoc.html" target="LayouTest" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a></td> + <td> | <a href="/solr/select?q=*:*&defType=edismax&start=0&rows=3&core=collection1&wt=html" target="LayouTest" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a></td> <td> | <a href="ViewFile.html" target="LayouTest">Parser</a></td> <td> | <a href="yacysearch.html" target="LayouTest">Pictures</a></td> <td> | <a href="CacheResource_p.html" target="LayouTest">Cache</a></td> diff --git a/htroot/IndexControlURLs_p.html b/htroot/IndexControlURLs_p.html index c22c46516..c1fd4d14f 100644 --- a/htroot/IndexControlURLs_p.html +++ b/htroot/IndexControlURLs_p.html @@ -216,9 +216,9 @@ function updatepage(str) { #(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 />
+ ::<iframe src="/solr/select?defType=edismax&start=0&rows=3&core=collection1&wt=html&q=id:%22#[urlhash]#%22" width="100%" height="420" frameborder="0" scrolling="no"></iframe><br />
<div id="api">
- <a href="/api/yacydoc.html?urlhash=#[urlhash]#">
+ <a href="/solr/select?defType=edismax&start=0&rows=3&core=collection1&wt=html&q=id:%22#[urlhash]#%22">
<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.
diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index abda39d6d..2bf65cbbf 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -88,39 +88,20 @@ function updatepage(str) { </dl>
</fieldset>
</form>
+<table border="0">
+<tr><td valign="top">
#(error)#
<form method="get" action="ViewFile.html" accept-charset="ascii">
<fieldset><legend>URL Metadata</legend>
<dl>
<dt>URL:</dt><dd><a href="#[url]#">#[url]#</a></dd>
- <dt>Hash:</dt><dd><a href="/api/yacydoc.html?urlhash=#[hash]#">#[hash]#</a></dd>
+ <dt>Hash:</dt><dd><a href="/solr/select?defType=edismax&start=0&rows=3&core=collection1&wt=html&q=id:%22#[hash]#%22">#[hash]#</a> (click this for full metadata)</dd>
<dt>In Metadata:</dt><dd>#(inurldb)#no::yes#(/inurldb)#</dd>
<dt>In Cache:</dt><dd>#(incache)#no::yes#(/incache)#</dd>
<dt>Word Count:</dt><dd>#[wordCount]#</dd>
<dt>Description:</dt><dd>#[desc]#</dd>
<dt>Size:</dt><dd>#[size]# Bytes</dd>#(mimeTypeAvailable)#::
<dt>MimeType:</dt><dd>#[mimeType]#</dd>#(/mimeTypeAvailable)#
- <dt>Referrer Hash:</dt><dd>#[referrerHash]#</dd>
- <dt>Modified Date:</dt><dd>#[moddate]#</dd>
- <dt>Load Date:</dt><dd>#[loaddate]#</dd>
- <dt>Fresh Date:</dt><dd>#[freshdate]#</dd>
- <dt>Host Hash:</dt><dd>#[hosthash]#</dd>
- <dt>dc_creator:</dt><dd>#[dc_creator]#</dd>
- <dt>dc_publisher:</dt><dd>#[dc_publisher]#</dd>
- <dt>dc_subject:</dt><dd>#[dc_subject]#</dd>
- <dt>md5:</dt><dd>#[md5]#</dd>
- <dt>lat:</dt><dd>#[lat]#</dd>
- <dt>lon:</dt><dd>#[lon]#</dd>
- <dt>doctype:</dt><dd>#[doctype]#</dd>
- <dt>Language:</dt><dd>#[language]#</dd>
- <dt>Flags:</dt><dd>#[flags]#</dd>
- <dt>Word Count:</dt><dd>#[wordCount]#</dd>
- <dt>Local Links:</dt><dd>#[llocal]#</dd>
- <dt>Global Links:</dt><dd>#[lother]#</dd>
- <dt>Image Links:</dt><dd>#[limage]#</dd>
- <dt>Audio Links:</dt><dd>#[laudio]#</dd>
- <dt>Video Links:</dt><dd>#[lvideo]#</dd>
- <dt>App Links:</dt><dd>#[lapp]#</dd>
<dt>Collections:</dt><dd>#[collections]#</dd>
<dt>Triplestore:</dt><dd><pre>#[triples]#</pre></dd>
<dt><label for="viewMode">View as</label>:</dt>
@@ -156,7 +137,7 @@ function updatepage(str) { :: <!-- 6 -->
<span class="error">Unsupported protocol.</span>
#(/error)#
-
+</td><td valign="top">
#(viewMode)#
:: <!-- 1 -->
<fieldset><legend>Original Content from Web</legend>
@@ -225,7 +206,7 @@ function updatepage(str) { </ol>
</fieldset>
#(/viewMode)#
-
+</td></tr></table>
#%env/templates/footer.template%#
</body>
diff --git a/htroot/solr/select.java b/htroot/solr/select.java index 00f872490..c127d2bae 100644 --- a/htroot/solr/select.java +++ b/htroot/solr/select.java @@ -33,6 +33,7 @@ import net.yacy.cora.federate.solr.SolrServlet; import net.yacy.cora.federate.solr.connector.EmbeddedSolrConnector; import net.yacy.cora.federate.solr.responsewriter.EnhancedXMLResponseWriter; import net.yacy.cora.federate.solr.responsewriter.GSAResponseWriter; +import net.yacy.cora.federate.solr.responsewriter.HTMLResponseWriter; import net.yacy.cora.federate.solr.responsewriter.JsonResponseWriter; import net.yacy.cora.federate.solr.responsewriter.OpensearchResponseWriter; import net.yacy.cora.protocol.HeaderFramework; @@ -83,6 +84,7 @@ public class select { xsltWriter.init(initArgs); RESPONSE_WRITER.put("xslt", xsltWriter); // try i.e. http://localhost:8090/solr/select?q=*:*&start=0&rows=10&wt=xslt&tr=json.xsl RESPONSE_WRITER.put("exml", new EnhancedXMLResponseWriter()); + RESPONSE_WRITER.put("html", new HTMLResponseWriter()); RESPONSE_WRITER.put("rss", opensearchResponseWriter); //try http://localhost:8090/solr/select?wt=rss&q=olympia&hl=true&hl.fl=text_t,h1,h2 RESPONSE_WRITER.put("opensearch", opensearchResponseWriter); //try http://localhost:8090/solr/select?wt=rss&q=olympia&hl=true&hl.fl=text_t,h1,h2 RESPONSE_WRITER.put("yjson", new JsonResponseWriter()); //try http://localhost:8090/solr/select?wt=json&q=olympia&hl=true&hl.fl=text_t,h1,h2 @@ -107,7 +109,7 @@ public class select { if ("exml".equals(wt)) return "application/rss+xml"; if ("json".equals(wt)) return "application/json"; if ("yjson".equals(wt)) return "application/json"; - if ("python".equals(wt)) return "text/html"; + if ("html".equals(wt) || "python".equals(wt)) return "text/html"; if ("php".equals(wt) || "phps".equals(wt)) return "application/x-httpd-php"; if ("ruby".equals(wt)) return "text/html"; if ("raw".equals(wt)) return "application/octet-stream"; diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.html index 906e3c95a..9b30e35b5 100644 --- a/htroot/yacysearchitem.html +++ b/htroot/yacysearchitem.html @@ -26,7 +26,7 @@ <p class="urlinfo"> #(showDate)#::#[date]##(/showDate)# #(showSize)#:: | #[sizename]##(/showSize)# - #(showMetadata)#:: | <a href="api/yacydoc.html?urlhash=#[urlhash]#" target="_blank" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a>#(/showMetadata)# + #(showMetadata)#:: | <a href="/solr/select?q=id:%22#[urlhash]#%22&defType=edismax&start=0&rows=1&core=collection1&wt=html" target="_blank" onclick="return hs.htmlExpand(this, { objectType: 'ajax'} )">Metadata</a>#(/showMetadata)# #(showParser)#:: | <a href="ViewFile.html?urlHash=#[urlhash]#&words=#[words]#" target="_blank">Parser</a>#(/showParser)# #(showPictures)#:: | <a href="yacysearch.html?cat=image&url=#[link]#&query=#[former]#">Pictures</a>#(/showPictures)# #(showCache)#:: | <a href="CacheResource_p.html?url=#[link]#" target="_blank">Cache</a>#(/showCache)# |
