Skip to content

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

- added collections to yacydoc - changed yacydoc.htm to yacydoc.json - added query logging in solr and gsa search result

Michael Peter Christenb69ed96f0b15
diff --git a/htroot/api/yacydoc.htm b/htroot/api/yacydoc.htm
deleted file mode 100644
index 8089692e9..000000000
--- a/htroot/api/yacydoc.htm
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "result": "#[taglinks]#"
-}
\ No newline at end of file
diff --git a/htroot/api/yacydoc.html b/htroot/api/yacydoc.html
index 89236c710..58e087556 100644
--- a/htroot/api/yacydoc.html
+++ b/htroot/api/yacydoc.html
@@ -39,6 +39,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<dt>YaCy Identifier</dt><dd property="dc:identifier">yacy:urlhash:#[yacy_urlhash]#</dd>
<dt>Identifier</dt><dd><a href="#[dc_identifier]#" property="dc:identifier">#[dc_identifier]#</a></dd>
<dt>Language</dt><dd property="dc:language">#[dc_language]#</dd>
+ <dt>Collections</dt><dd property="collection">#[collection]#</dd>
<dt>Load Date</dt><dd property="yacy:loaddate">#[yacy_loaddate]#</dd>
<dt>Referrer Identifier</dt><dd property="yacy:referrer.hash">yacy:urlhash:#[yacy_referrer_hash]#</dd>
diff --git a/htroot/api/yacydoc.java b/htroot/api/yacydoc.java
index 51111151f..03ab6523a 100644
--- a/htroot/api/yacydoc.java
+++ b/htroot/api/yacydoc.java
@@ -26,6 +26,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import java.net.MalformedURLException;
+import java.util.Arrays;
import java.util.Iterator;
import net.yacy.cora.date.ISO8601Formatter;
@@ -68,6 +69,7 @@ public class yacydoc {
prop.put("dc_type", "");
prop.put("dc_identifier", "");
prop.put("dc_language", "");
+ prop.put("collection", "");
prop.put("geo_lat", "");
prop.put("geo_long", "");
@@ -115,6 +117,7 @@ public class yacydoc {
prop.putXML("dc_type", String.valueOf(entry.doctype()));
prop.putXML("dc_identifier", entry.url().toNormalform(false, true));
prop.putXML("dc_language", ASCII.String(entry.language()));
+ prop.putXML("collection", Arrays.toString(entry.collections()));
prop.put("geo_lat", entry.lat());
prop.put("geo_long", entry.lon());
diff --git a/htroot/api/yacydoc.xml b/htroot/api/yacydoc.xml
index 9f916bb9f..10ed03988 100644
--- a/htroot/api/yacydoc.xml
+++ b/htroot/api/yacydoc.xml
@@ -20,6 +20,7 @@ you can validate it with http://www.stg.brown.edu/service/xmlvalid/
<dc:identifier SCHEME="URL">#[dc_identifier]#</dc:identifier>
<dc:format.extent>#[yacy_size]#</dc:format.extent>
<dc:language SCHEME="ISO639-2">#[dc_language]#</dc:language>
+ <collections>#[collection]#</collections>
<geo:Point>
<geo:long>#[geo_long]#</geo:long>
<geo:lat>#[geo_lat]#</geo:lat>
diff --git a/htroot/gsa/searchresult.java b/htroot/gsa/searchresult.java
index a0bab0ed5..23f5feded 100644
--- a/htroot/gsa/searchresult.java
+++ b/htroot/gsa/searchresult.java
@@ -95,6 +95,7 @@ public class searchresult {
// check post
if (post == null) return null;
+ Log.logInfo("GSA Query", post.toString());
sb.intermissionAllThreads(3000); // tell all threads to do nothing for a specific time
// rename post fields according to result style
diff --git a/htroot/interaction_elements/Tag_part.html b/htroot/interaction_elements/Tag_part.html
index 5ff01af41..be27d2425 100644
--- a/htroot/interaction_elements/Tag_part.html
+++ b/htroot/interaction_elements/Tag_part.html
@@ -45,7 +45,7 @@ color: #5a346e;
$.ajaxSetup({async: false});
- $.getJSON('/currentyacypeer/api/yacydoc.htm?urlhash=#[hash]#', function(data) {
+ $.getJSON('/currentyacypeer/api/yacydoc.json?urlhash=#[hash]#', function(data) {
resultstring = data.result;
});
diff --git a/htroot/solr/select.java b/htroot/solr/select.java
index 0bd9562ad..f413fbd38 100644
--- a/htroot/solr/select.java
+++ b/htroot/solr/select.java
@@ -132,6 +132,7 @@ public class select {
// check post
if (post == null) return null;
+ Log.logInfo("SOLR Query", post.toString());
sb.intermissionAllThreads(3000); // tell all threads to do nothing for a specific time
// rename post fields according to result style