From a08a3c5f29bc0e71ff48a0e7f4ce1585082c20c6 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 13 Apr 2015 16:18:15 +0200 Subject: [PATCH] reverted json syntax for facet results to version from january --- htroot/yacysearchtrailer.java | 2 +- htroot/yacysearchtrailer.json | 40 +++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.java index 3019a4baf..f0b445056 100644 --- a/htroot/yacysearchtrailer.java +++ b/htroot/yacysearchtrailer.java @@ -289,7 +289,7 @@ public class yacysearchtrailer { } // topics navigator - final ScoreMap topicNavigator = sb.index.connectedRWI() ? theSearch.getTopicNavigator(TOPWORDS_MAXCOUNT) : null; + final ScoreMap topicNavigator = theSearch.getTopicNavigator(TOPWORDS_MAXCOUNT); if (topicNavigator == null || topicNavigator.isEmpty()) { prop.put("nav-topics", "0"); } else { diff --git a/htroot/yacysearchtrailer.json b/htroot/yacysearchtrailer.json index 46448418e..a1f4e1c38 100644 --- a/htroot/yacysearchtrailer.json +++ b/htroot/yacysearchtrailer.json @@ -1,5 +1,5 @@ - "navigation": {#(nav-dates)#:: - "dates": { + "navigation": [#(nav-dates)#::{ + "facetname": "dates", "displayname": "Filetype", "type": "String", "min": "0", @@ -7,11 +7,11 @@ "mean": "0", "elements": [ #{element}# - {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# + {"name": "#[name]#", "count": "#[count]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-dates)##(nav-filetypes)#:: - "filetypes": { + },#(/nav-dates)##(nav-filetypes)#::{ + "facetname": "filetypes", "displayname": "Filetype", "type": "String", "min": "0", @@ -22,8 +22,8 @@ {"name": "#[name]#", "count": "#[count]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-filetypes)##(nav-protocols)#:: - "protocols": { + },#(/nav-filetypes)##(nav-protocols)#::{ + "facetname": "protocols", "displayname": "Protocol", "type": "String", "min": "0", @@ -34,8 +34,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-protocols)##(nav-domains)#:: - "domains": { + },#(/nav-protocols)##(nav-domains)#::{ + "facetname": "domains", "displayname": "Domains", "type": "String", "min": "0", @@ -46,8 +46,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-domains)##(nav-namespace)#:: - "namespace": { + },#(/nav-domains)##(nav-namespace)#::{ + "facetname": "namespace", "displayname": "Name Space", "type": "String", "min": "0", @@ -58,8 +58,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-namespace)##(nav-authors)#:: - "authors": { + },#(/nav-namespace)##(nav-authors)#::{ + "facetname": "authors", "displayname": "Authors", "type": "String", "min": "0", @@ -70,8 +70,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-authors)##(nav-collections)#:: - "collections": { + },#(/nav-authors)##(nav-collections)#::{ + "facetname": "collections", "displayname": "Collections", "type": "String", "min": "0", @@ -82,8 +82,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#(/nav-collections)##{nav-vocabulary}# - "#[navname]#": { + },#(/nav-collections)##{nav-vocabulary}#{ + "facetname": "#[navname]#", "displayname": "#[navname]#", "type": "String", "min": "0", @@ -94,8 +94,8 @@ {"name": "#[name]#", "count": "#[count]#", "modifier": "#[modifier]#", "url": "#[url]#"}#(nl)#::,#(/nl)# #{/element}# ] - },#{/nav-vocabulary}##(nav-topics)#"topics": {}:: - "topics": { + },#{/nav-vocabulary}##(nav-topics)#{}::{ + "facetname": "topics", "displayname": "Topics", "type": "String", "min": "0", @@ -107,5 +107,5 @@ #{/element}# ] }#(/nav-topics)# - }, + ], "totalResults": "#[num-results_totalcount]#" \ No newline at end of file