- show only x+1 pages in page navigator

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6022 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 94f3d90af2
commit a0c53abbe1

@ -463,7 +463,7 @@ public class yacysearch {
resnav.append(plasmaSearchQuery.navurl("html", thispage - 1, display, theQuery, originalUrlMask, null));
resnav.append("\"><img src=\"env/grafics/navdl.gif\" width=\"16\" height=\"16\"></a>&nbsp;");
}
final int numberofpages = Math.min(10, Math.max(thispage + 2, totalcount / theQuery.displayResults()));
final int numberofpages = Math.min(10, Math.min(thispage + 2, totalcount / theQuery.displayResults()));
for (int i = 0; i < numberofpages; i++) {
if (i == thispage) {
resnav.append("<img src=\"env/grafics/navs");

@ -74,8 +74,8 @@ public class yacysearchtrailer {
prop.put("nav-domains_element_" + i + "_nl", 1);
}
i--;
prop.put("nav_domains_element_" + i + "_nl", 0);
prop.put("nav_domains_element", hostNavigator.size());
prop.put("nav-domains_element_" + i + "_nl", 0);
prop.put("nav-domains_element", hostNavigator.size());
}
// attach the bottom line with search references (topwords)

@ -138,13 +138,18 @@ public final class plasmaSearchEvent {
final long start = System.currentTimeMillis();
if ((query.domType == plasmaSearchQuery.SEARCHDOM_GLOBALDHT) ||
(query.domType == plasmaSearchQuery.SEARCHDOM_CLUSTERALL)) {
// do a global search
// initialize a ranking process that is the target for data
// that is generated concurrently from local and global search threads
this.rankedCache = new plasmaSearchRankingProcess(indexSegment, query, max_results_preparation, 16);
final int fetchpeers = 12;
// the result of the fetch is then in the rcGlobal
// start a local search
localSearchThread = new localSearchProcess();
localSearchThread.start();
// start global searches
final long timer = System.currentTimeMillis();
final int fetchpeers = 12;
Log.logFine("SEARCH_EVENT", "STARTING " + fetchpeers + " THREADS TO CATCH EACH " + query.displayResults() + " URLs");
this.primarySearchThreads = yacySearch.primaryRemoteSearches(
plasmaSearchQuery.hashSet2hashString(query.queryHashes),
@ -167,10 +172,6 @@ public final class plasmaSearchEvent {
(query.domType == plasmaSearchQuery.SEARCHDOM_GLOBALDHT) ? null : preselectedPeerHashes);
serverProfiling.update("SEARCH", new plasmaProfiling.searchEvent(query.id(true), "remote search thread start", this.primarySearchThreads.length, System.currentTimeMillis() - timer), false);
// meanwhile do a local search
localSearchThread = new localSearchProcess();
localSearchThread.start();
// finished searching
Log.logFine("SEARCH_EVENT", "SEARCH TIME AFTER GLOBAL-TRIGGER TO " + primarySearchThreads.length + " PEERS: " + ((System.currentTimeMillis() - start) / 1000) + " seconds");
} else {
@ -598,9 +599,8 @@ public final class plasmaSearchEvent {
// search thread is started as background process
if ((localSearchThread != null) && (localSearchThread.isAlive())) {
// in case that the local search takes longer than some other
// remote search requests, do some sleeps to give the local process
// a chance to contribute
try {Thread.sleep(item * 50L);} catch (final InterruptedException e) {}
// remote search requests, wait that the local process terminates first
try {localSearchThread.join();} catch (InterruptedException e) {}
}
// now wait until as many remote worker threads have finished, as we
// want to display results

Loading…
Cancel
Save