Skip to content

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

fixed search performance / dynamic display of results

apfelmaennchenf63bd2626866
diff --git a/htroot/yacy/ui/index.html b/htroot/yacy/ui/index.html
index 3244502ff..c90062bc1 100644
--- a/htroot/yacy/ui/index.html
+++ b/htroot/yacy/ui/index.html
@@ -20,25 +20,22 @@
<script src="js/jquery.field.min.js" type="text/javascript"></script>
<script src="js/ui.tabs.min.js" type="text/javascript"></script>
<script type="text/javascript">
- $(document).ready(function() {
- $('#container > ul').tabs();
+ $(function() {
+ var $tabs = $('#container > ul').tabs();
insert_sidebar();
$('#searchbox').submit(function() {
var tabnr = $('#container > ul').tabs('length');
var result = "result.html?" + $('#searchbox').formSerialize();
- var tabname = "*" + $("input[@name='search']").getValue();
- $('#container > ul').tabs('add', '#empty', tabname);
- $('#container > ul').tabs('select', tabnr);
- $('#container > ul').tabs('url', tabnr, result);
- $('#container > ul').tabs('load', tabnr);
+ var tabname = $("input[@name='search']").getValue();
+ $('<div id='+tabname+'</div>').appendTo('#container');
+ $tabs.tabs('add', result, '*'+tabname);
+ $tabs.tabs('select',tabnr);
return false;
});
});
function insert_sidebar() {
$('<div id="pager" class="boxed"></div>').appendTo('#sidebar')
- $("#pager").load("sidebar/sidebar_pager.html");
- $('<div id="example" class="boxed"></div>').appendTo('#sidebar')
- $("#example").load("sidebar/sidebar.html");
+ $("#pager").load("sidebar/sidebar_pager.html");
}
</script>
</head>
@@ -95,8 +92,7 @@
<ul>
<li><a href="welcome.html" title="Welcome"><span>Welcome</span></a></li>
<li><a href="ymarks.html" title="Ymarks"><span>Y-Marks</span></a></li>
- </ul>
- <div id="empty"></div>
+ </ul>
</div>
<div id="sidebar" class="sidebar"><!-- Sidebar wird dynamisch geladen --></div>
</body>
diff --git a/htroot/yacy/ui/result.html b/htroot/yacy/ui/result.html
index 209970bf2..01b085174 100644
--- a/htroot/yacy/ui/result.html
+++ b/htroot/yacy/ui/result.html
@@ -1,18 +1,22 @@
-<script type="text/javascript">
- $(document).ready(function() {
- var url = "/yacy/user/sidebar_history.html?eventID=#[eventID]#";
- $('<div id="history" class="boxed"></div>').appendTo('#sidebar')
- $("#history").load(url);
- });
-</script>
-
+<div id="#[ID]#"></div>
<!-- linklist begin -->
#(resultTable)#::<table width="100%"><tr class="TableHeader"><td width="30%">Media</td><td width="70%">URL</tr>#(/resultTable)#
#{results}#
-<!--#include virtual="/yacy/user/ysearchitem.html?rss=false&item=#[item]#&eventID=#[eventID]#" -->
+<script type="text/javascript">
+ $(function() {
+ var id = "#"+"#[ID]#";
+ $.get("/yacy/ui/ritem.html?rss=false&item=#[item]#&eventID=#[eventID]#", function(html) {
+ $(id).append(html);
+ $(id).trigger("update");
+ });
+ });
+</script>
#{/results}#
#(resultTable)#::</table>#(/resultTable)#
-/yacy/user/sidebar_history.html?eventID=#[eventID]#
+
+
+
+
diff --git a/htroot/yacy/ui/result.java b/htroot/yacy/ui/result.java
index 79cc2ddc2..241b5ba04 100644
--- a/htroot/yacy/ui/result.java
+++ b/htroot/yacy/ui/result.java
@@ -123,6 +123,8 @@ public class result {
constraint.set(plasmaCondenser.flag_cat_indexof, true);
}
+ int domainzone = post.getInt("zone", yacyURL.TLD_any_zone_filter);
+
// SEARCH
//final boolean indexDistributeGranted = sb.getConfig(plasmaSwitchboard.INDEX_DIST_ALLOW, "true").equals("true");
//final boolean indexReceiveGranted = sb.getConfig("allowReceiveIndex", "true").equals("true");
@@ -182,7 +184,7 @@ public class result {
20,
constraint,
true,
- yacyURL.TLD_any_zone_filter,
+ domainzone,
client);
@@ -241,10 +243,12 @@ public class result {
for (int i = 0; i < theQuery.displayResults(); i++) {
prop.put("results_" + i + "_item", offset + i);
prop.put("results_" + i + "_eventID", theQuery.id(false));
+ prop.put("results_" + i + "_ID", theQuery.id(false).substring(1,6));
}
prop.put("results", theQuery.displayResults());
prop.put("resultTable", (contentdomCode <= 1) ? "0" : "1");
prop.put("eventID", theQuery.id(false)); // for bottomline
+ prop.put("ID", theQuery.id(false).substring(1,6)); // for bottomline
// process result of search
if (filtered.size() > 0) {
@@ -300,8 +304,8 @@ public class result {
prop.putHTML("rss_query", querystring, true);
prop.put("rss_queryenc", yacyURL.escape(querystring.replace(' ', '+')));
- sb.localSearchLastAccess = System.currentTimeMillis();
-
+ sb.localSearchLastAccess = System.currentTimeMillis();
+
// return rewrite properties
return prop;
}