diff --git a/htroot/Network.html b/htroot/Network.html index b5741d6ea..5f88e5f75 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -51,14 +51,14 @@ send Message/
show Profile/
edit Wiki
  Name
  - Info
  + Info
  Release/
SVN

  PPM
  QPH
  Last
Seen

  < > UTC
Offset
  Location

  - Uptime
  < > + Uptime
  < > Links
  < > RWIs
  < > URLs for
Remote
Crawl

  diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java index dce566670..e3688556d 100644 --- a/htroot/yacy/search.java +++ b/htroot/yacy/search.java @@ -89,6 +89,9 @@ public final class search { // test: // http://localhost:8080/yacy/search.html?query=4galTpdpDM5Q (search for linux) // http://localhost:8080/yacy/search.html?query=gh8DKIhGKXws (search for book) + // http://localhost:8080/yacy/search.html?query=UEhMGfGv2vOE (search for kernel) + // http://localhost:8080/yacy/search.html?query=ZX-LjaYo74PP (search for help) + // http://localhost:8080/yacy/search.html?query=uDqIalxDfM2a (search for mail) // http://localhost:8080/yacy/search.html?query=4galTpdpDM5Qgh8DKIhGKXws&abstracts=auto (search for linux and book, generate abstract automatically) // http://localhost:8080/yacy/search.html?query=&abstracts=4galTpdpDM5Q (only abstracts for linux) @@ -223,7 +226,7 @@ public final class search { // prepare reference hints localProcess.startTimer(); - Object[] ws = theSearch.references(); + Object[] ws = theSearch.references(10); StringBuffer refstr = new StringBuffer(); for (int j = 0; j < ws.length; j++) refstr.append(",").append((String) ws[j]); diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index cac09fb49..0db64aa7f 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -99,10 +99,6 @@ document.getElementById("Enter").value = "search again - catch up more links"; ::

No Results. (length of search words must be at least 3 characters)

:: -

No Results. Please repeat your search to see if there are late-responses from remote peers.

- :: -

No Results. "#[wrong_regex]#" is no valid regular expression. Please go back to the previous page and make sure to enter a valid regular expressions for URL mask and Prefer mask.

- ::

#[offset]#-#[linkcount]# results from a total number of #[totalcount]# known#(globalresults)#.::, #[globalcount]# links from other YaCy peers.#(/globalresults)#

Search Result Pages: #[pagenav]#

:: @@ -111,19 +107,23 @@ document.getElementById("Enter").value = "search again - catch up more links"; #(combine)#:: -

Refine with:

-

#{words}##[word]##{/words}#

+

Topwords: +#{words}# #[word]##{/words}# +

#(/combine)# -
+#(resultTable)#::#(/resultTable)# #{results}# #{/results}# +#(resultTable)#::
MediaURL
#(/resultTable)# + + diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 18d314fb8..291d827d3 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -49,14 +49,12 @@ import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; -import java.util.Iterator; import java.util.TreeSet; import de.anomic.http.httpHeader; import de.anomic.index.indexURLEntry; import de.anomic.kelondro.kelondroBitfield; import de.anomic.kelondro.kelondroMSetTools; -import de.anomic.kelondro.kelondroNaturalOrder; import de.anomic.plasma.plasmaCondenser; import de.anomic.plasma.plasmaParserDocument; import de.anomic.plasma.plasmaSearchEvent; @@ -78,8 +76,6 @@ import de.anomic.yacy.yacyURL; public class yacysearch { - public static final int MAX_TOPWORDS = 24; - public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) { final plasmaSwitchboard sb = (plasmaSwitchboard) env; @@ -142,7 +138,8 @@ public class yacysearch { prop.put("excluded", 0); prop.put("combine", 0); prop.put("results", ""); - prop.put("num-results", (searchAllowed) ? 0 : 6); + prop.put("resultTable", 0); + prop.put("num-results", (searchAllowed) ? 0 : 4); return prop; } @@ -286,7 +283,6 @@ public class yacysearch { long timestamp = System.currentTimeMillis(); // create a new search event - String wrongregex = null; if (plasmaSearchEvent.getEvent(theQuery.id()) == null) { theQuery.setOffset(0); // in case that this is a new search, always start without a offset offset = 0; @@ -358,7 +354,9 @@ public class yacysearch { prop.put("results_" + i + "_eventID", theQuery.id()); } prop.put("results", theQuery.displayResults()); - + prop.put("resultTable", (contentdomCode <= 1) ? 0 : 1); + prop.put("eventID", theQuery.id()); // for bottomline + // process result of search if (filtered.size() > 0) { prop.put("excluded", 1); @@ -374,63 +372,7 @@ public class yacysearch { prop.put("num-results", 1); // no results } } else { - final int totalcount = prop.getInt("num-results_totalcount", 0); - if (totalcount >= 10) { - final Object[] references = (Object[]) prop.get( "references", new String[0]); - prop.put("num-results", 5); - int hintcount = references.length; - if (hintcount > 0) { - prop.put("combine", 1); - // get the topwords - final TreeSet topwords = new TreeSet(kelondroNaturalOrder.naturalOrder); - String tmp = ""; - for (int i = 0; i < hintcount; i++) { - tmp = (String) references[i]; - if (tmp.matches("[a-z]+")) { - topwords.add(tmp); - } - } - - // filter out the badwords - final TreeSet filteredtopwords = kelondroMSetTools.joinConstructive(topwords, plasmaSwitchboard.badwords); - if (filteredtopwords.size() > 0) { - kelondroMSetTools.excludeDestructive(topwords, plasmaSwitchboard.badwords); - } - - // avoid stopwords being topwords - if (env.getConfig("filterOutStopwordsFromTopwords", "true").equals("true")) { - if ((plasmaSwitchboard.stopwords != null) && (plasmaSwitchboard.stopwords.size() > 0)) { - kelondroMSetTools.excludeDestructive(topwords, plasmaSwitchboard.stopwords); - } - } - - String word; - hintcount = 0; - final Iterator iter = topwords.iterator(); - while (iter.hasNext()) { - word = (String) iter.next(); - if (word != null) { - prop.put("combine_words_" + hintcount + "_word", word); - prop.put("combine_words_" + hintcount + "_newsearch", post.get("search", "").replace(' ', '+') + "+" + word); - prop.put("combine_words_" + hintcount + "_count", count); - prop.put("combine_words_" + hintcount + "_offset", offset); - prop.put("combine_words_" + hintcount + "_resource", ((global) ? "global" : "local")); - prop.put("combine_words_" + hintcount + "_time", (searchtime / 1000)); - } - prop.put("combine_words", hintcount); - if (hintcount++ > MAX_TOPWORDS) { - break; - } - } - } - } else { - if (wrongregex != null) { - prop.put("num-results_wrong_regex", wrongregex); - prop.put("num-results", 4); - } else { - prop.put("num-results", 5); - } - } + prop.put("num-results", 3); } prop.put("input_cat", "href"); diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.html index ad30d188a..53dfac709 100644 --- a/htroot/yacysearchitem.html +++ b/htroot/yacysearchitem.html @@ -20,13 +20,30 @@

#[date]# | YBR-#[ybr]# | Info | Pictures

:: - #{images}# + #{items}#
#[name]#
#[name]#
- #{/images}# + #{/items}# + :: + #{items}# + #[name]##[hrefshort]# + #{/items}# + :: + #{items}# + #[name]##[hrefshort]# + #{/items}# + :: + #{items}# + #[name]##[hrefshort]# + #{/items}# #(/content)# +#(references)#:: +

Topwords: +#{words}# #[word]##{/words}# +

+#(/references)#