Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

URL Viewer : only display the link to metadata when metadata exists

luccioman5b5b9d5d96d8
diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html
index c31d3d3ac..3481c4690 100644
--- a/htroot/ViewFile.html
+++ b/htroot/ViewFile.html
@@ -103,7 +103,7 @@ function updatepage(str) {
<fieldset><legend>URL Metadata</legend>
<dl>
<dt>URL:</dt><dd><a href="#[url]#">#[url]#</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>Hash:</dt><dd>#(inurldb)##[hash]#::<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)#(/inurldb)#</dd>
<dt>In Metadata:</dt><dd>#(inurldb)#no::yes#(/inurldb)#</dd>
<dt>In Cache:</dt><dd>#(incache)#no::yes#(/incache)#</dd>
<dt>First Seen:</dt><dd>#[firstSeen]#</dd>
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index 9c61ba70d..778688825 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -356,6 +356,7 @@ public class ViewFile {
prop.put("error", "0");
prop.put("error_url", url.toNormalform(true));
prop.put("error_hash", urlHash);
+ prop.put("error_inurldb_hash", urlHash);
prop.put("error_wordCount", wordCount);
prop.put("error_firstSeen", "");
long firstseen = sb.index.getFirstSeenTime(ASCII.getBytes(urlHash));