Merge branch 'html-show-ranking' of

https://github.com/JeremyRand/yacy_search_server

Conflicts:
	defaults/yacy.init
This commit is contained in:
luccioman 2017-05-11 14:53:57 +02:00
commit efe1232d90
3 changed files with 4 additions and 0 deletions

View File

@ -863,6 +863,7 @@ search.result.show.hostbrowser = true
search.result.show.vocabulary = false
search.result.show.vocabulary.omit =
search.result.show.snapshots = false
search.result.show.ranking = false
# search navigators: comma-separated list of default values for search navigation.

View File

@ -38,6 +38,7 @@
#(showHostBrowser)#::&nbsp;|&nbsp;<a href="HostBrowser.html?path=#[link]#"><img src="env/grafics/minitree.png" width="15" height="8" title="Browse index" alt="Browse index"/></a>#(/showHostBrowser)#
#(showVocabulary)#::<br/>#{vocabulary}##[name]#:#[terms]# #{/vocabulary}##(/showVocabulary)#
#(showSnapshots)#::<a href="#[link]#">Snapshots</a>#(/showSnapshots)#
#(showRanking)#::&nbsp;|&nbsp;Ranking: #[ranking]##(/showRanking)#
</p>
</div>
::

View File

@ -215,6 +215,7 @@ public class yacysearchitem {
prop.put("content_showHostBrowser", sb.getConfigBool("search.result.show.hostbrowser", true) ? 1 : 0);
prop.put("content_showSnapshots", snapshotPaths != null && snapshotPaths.size() > 0 && sb.getConfigBool("search.result.show.snapshots", true) ? 1 : 0);
prop.put("content_showVocabulary", sb.getConfigBool("search.result.show.vocabulary", true) ? 1 : 0);
prop.put("content_showRanking", sb.getConfigBool("search.result.show.ranking", false) ? 1 : 0);
if (showEvent) prop.put("content_showEvent_date", GenericFormatter.RFC1123_SHORT_FORMATTER.format(events[0]));
prop.put("content_showDate_date", GenericFormatter.RFC1123_SHORT_FORMATTER.format(result.moddate()));
@ -245,6 +246,7 @@ public class yacysearchitem {
if (snapshotPaths != null && snapshotPaths.size() > 0) {
prop.put("content_showSnapshots_link", snapshotPaths.iterator().next().getAbsolutePath());
}
prop.put("content_showRanking_ranking", Float.toString(result.score()));
}
prop.put("content_urlhexhash", Seed.b64Hash2hexHash(urlhash));
prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), MAX_URL_LENGTH));