Permalink
Browse files

Merge pull request #1 from yacy/master

update
  • Loading branch information...
otteresk committed Sep 27, 2017
2 parents 66cb9c4 + fc28c58 commit 9f0e7dca91f5e28716d98b315fd7b658066ee197
Showing with 1,116 additions and 299 deletions.
  1. +18 −19 .classpath
  2. +18 −19 build.xml
  3. +8 −0 defaults/yacy.init
  4. +10 −0 htroot/ConfigPortal_p.html
  5. +22 −0 htroot/ConfigPortal_p.java
  6. +93 −79 htroot/ConfigSearchPage_p.html
  7. +26 −10 htroot/ConfigSearchPage_p.java
  8. +27 −18 htroot/HostBrowser.html
  9. +1 −1 htroot/IndexControlRWIs_p.java
  10. +3 −3 htroot/env/templates/footer.template
  11. +2 −2 htroot/env/templates/submenuDesign.template
  12. +64 −0 htroot/env/yacysort.css
  13. +134 −0 htroot/js/accessibleHistogram.js
  14. +0 −40 htroot/js/raphael-min.js
  15. +3 −0 htroot/js/raphael.min.js
  16. +117 −31 htroot/js/yacysearch.js
  17. +364 −0 htroot/js/yacysort.js
  18. +12 −2 htroot/jslicense.html
  19. +44 −5 htroot/yacysearch.html
  20. +18 −2 htroot/yacysearch.java
  21. +1 −1 htroot/yacysearchitem.html
  22. +1 −0 htroot/yacysearchitem.java
  23. +67 −50 htroot/yacysearchtrailer.html
  24. +5 −5 htroot/yacysearchtrailer.java
  25. BIN lib/jsonic-1.2.0.jar
  26. BIN lib/jsonic-1.3.10.jar
  27. BIN lib/{lucene-analyzers-common-6.6.0.jar → lucene-analyzers-common-6.6.1.jar}
  28. BIN lib/{lucene-analyzers-phonetic-6.6.0.jar → lucene-analyzers-phonetic-6.6.1.jar}
  29. BIN lib/{lucene-backward-codecs-6.6.0.jar → lucene-backward-codecs-6.6.1.jar}
  30. BIN lib/{lucene-classification-6.6.0.jar → lucene-classification-6.6.1.jar}
  31. BIN lib/{lucene-codecs-6.6.0.jar → lucene-codecs-6.6.1.jar}
  32. BIN lib/{lucene-core-6.6.0.jar → lucene-core-6.6.1.jar}
  33. BIN lib/lucene-facet-6.6.0.jar
  34. BIN lib/{lucene-grouping-6.6.0.jar → lucene-grouping-6.6.1.jar}
  35. BIN lib/{lucene-highlighter-6.6.0.jar → lucene-highlighter-6.6.1.jar}
  36. BIN lib/{lucene-join-6.6.0.jar → lucene-join-6.6.1.jar}
  37. BIN lib/lucene-memory-6.6.0.jar
  38. BIN lib/lucene-memory-6.6.1.jar
  39. BIN lib/{lucene-misc-6.6.0.jar → lucene-misc-6.6.1.jar}
  40. BIN lib/{lucene-queries-6.6.0.jar → lucene-queries-6.6.1.jar}
  41. BIN lib/{lucene-queryparser-6.6.0.jar → lucene-queryparser-6.6.1.jar}
  42. BIN lib/lucene-spatial-6.6.0.jar
  43. BIN lib/lucene-spatial-extras-6.6.1.jar
  44. BIN lib/{lucene-suggest-6.6.0.jar → lucene-suggest-6.6.1.jar}
  45. BIN lib/{solr-core-6.6.0.jar → solr-core-6.6.1.jar}
  46. BIN lib/{solr-solrj-6.6.0.jar → solr-solrj-6.6.1.jar}
  47. +3 −3 pom.xml
  48. +0 −4 source/net/yacy/search/Switchboard.java
  49. +11 −1 source/net/yacy/search/SwitchboardConstants.java
  50. +44 −4 source/net/yacy/search/query/QueryParams.java
@@ -65,24 +65,23 @@
<classpathentry kind="lib" path="lib/woodstox-core-asl-4.4.1.jar"/>
<classpathentry kind="lib" path="lib/apache-mime4j-0.6.jar"/>
<classpathentry kind="lib" path="lib/commons-math3-3.4.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-analyzers-common-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-backward-codecs-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-classification-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-codecs-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-facet-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-grouping-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-highlighter-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-join-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-memory-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-misc-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-queries-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-queryparser-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-spatial-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-suggest-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/solr-core-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/solr-solrj-6.6.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-analyzers-common-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-analyzers-phonetic-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-backward-codecs-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-classification-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-codecs-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-core-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-grouping-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-highlighter-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-join-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-memory-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-misc-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-queries-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-queryparser-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-spatial-extras-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/lucene-suggest-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/solr-core-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/solr-solrj-6.6.1.jar"/>
<classpathentry kind="lib" path="lib/zookeeper-3.4.10.jar"/>
<classpathentry kind="lib" path="lib/metrics-core-3.2.2.jar"/>
<classpathentry kind="lib" path="lib/spatial4j-0.6.jar"/>
@@ -99,7 +98,7 @@
<classpathentry kind="lib" path="lib/imageio-metadata-3.3.1.jar"/>
<classpathentry kind="lib" path="lib/imageio-tiff-3.3.1.jar"/>
<classpathentry kind="lib" path="lib/imageio-bmp-3.3.1.jar"/>
<classpathentry kind="lib" path="lib/jsonic-1.2.0.jar"/>
<classpathentry kind="lib" path="lib/jsonic-1.3.10.jar"/>
<classpathentry kind="lib" path="lib/langdetect.jar"/>
<classpathentry kind="lib" path="lib/jwat-common-1.1.0.jar"/>
<classpathentry kind="lib" path="lib/jwat-gzip-1.1.0.jar"/>
@@ -218,29 +218,28 @@
<pathelement location="${lib}/jetty-xml-9.4.6.v20170531.jar" />
<pathelement location="${lib}/jsch-0.1.54.jar" />
<pathelement location="${lib}/json-simple-1.1.1.jar" />
<pathelement location="${lib}/jsonic-1.2.0.jar" />
<pathelement location="${lib}/jsonic-1.3.10.jar" />
<pathelement location="${lib}/jsoup-1.10.3.jar" />
<pathelement location="${lib}/jwat-archive-common-1.1.0.jar" />
<pathelement location="${lib}/jwat-common-1.1.0.jar" />
<pathelement location="${lib}/jwat-gzip-1.1.0.jar" />
<pathelement location="${lib}/jwat-warc-1.1.0.jar" />
<pathelement location="${lib}/log4j-over-slf4j-1.7.24.jar" />
<pathelement location="${lib}/lucene-analyzers-common-6.6.0.jar" />
<pathelement location="${lib}/lucene-analyzers-phonetic-6.6.0.jar" />
<pathelement location="${lib}/lucene-backward-codecs-6.6.0.jar" />
<pathelement location="${lib}/lucene-classification-6.6.0.jar" />
<pathelement location="${lib}/lucene-codecs-6.6.0.jar" />
<pathelement location="${lib}/lucene-core-6.6.0.jar" />
<pathelement location="${lib}/lucene-facet-6.6.0.jar" />
<pathelement location="${lib}/lucene-grouping-6.6.0.jar" />
<pathelement location="${lib}/lucene-highlighter-6.6.0.jar" />
<pathelement location="${lib}/lucene-join-6.6.0.jar" />
<pathelement location="${lib}/lucene-memory-6.6.0.jar" />
<pathelement location="${lib}/lucene-misc-6.6.0.jar" />
<pathelement location="${lib}/lucene-queries-6.6.0.jar" />
<pathelement location="${lib}/lucene-queryparser-6.6.0.jar" />
<pathelement location="${lib}/lucene-spatial-6.6.0.jar" />
<pathelement location="${lib}/lucene-suggest-6.6.0.jar" />
<pathelement location="${lib}/lucene-analyzers-common-6.6.1.jar" />
<pathelement location="${lib}/lucene-analyzers-phonetic-6.6.1.jar" />
<pathelement location="${lib}/lucene-backward-codecs-6.6.1.jar" />
<pathelement location="${lib}/lucene-classification-6.6.1.jar" />
<pathelement location="${lib}/lucene-codecs-6.6.1.jar" />
<pathelement location="${lib}/lucene-core-6.6.1.jar" />
<pathelement location="${lib}/lucene-grouping-6.6.1.jar" />
<pathelement location="${lib}/lucene-highlighter-6.6.1.jar" />
<pathelement location="${lib}/lucene-join-6.6.1.jar" />
<pathelement location="${lib}/lucene-memory-6.6.1.jar" />
<pathelement location="${lib}/lucene-misc-6.6.1.jar" />
<pathelement location="${lib}/lucene-queries-6.6.1.jar" />
<pathelement location="${lib}/lucene-queryparser-6.6.1.jar" />
<pathelement location="${lib}/lucene-spatial-extras-6.6.1.jar" />
<pathelement location="${lib}/lucene-suggest-6.6.1.jar" />
<pathelement location="${lib}/metadata-extractor-2.10.1.jar" />
<pathelement location="${lib}/metrics-core-3.2.2.jar" />
<pathelement location="${lib}/noggit-0.6.jar" />
@@ -251,8 +250,8 @@
<pathelement location="${lib}/poi-scratchpad-3.16.jar" />
<pathelement location="${lib}/slf4j-api-1.7.24.jar" />
<pathelement location="${lib}/slf4j-jdk14-1.7.24.jar" />
<pathelement location="${lib}/solr-core-6.6.0.jar" />
<pathelement location="${lib}/solr-solrj-6.6.0.jar" />
<pathelement location="${lib}/solr-core-6.6.1.jar" />
<pathelement location="${lib}/solr-solrj-6.6.1.jar" />
<pathelement location="${lib}/spatial4j-0.6.jar" />
<pathelement location="${lib}/stax2-api_3.1.4.jar" />
<pathelement location="${lib}/weupnp-0.1.4.jar" />
@@ -885,6 +885,9 @@ search.navigation=location,hosts,authors,namespace,topics,filetype,protocol,lang
# max number of items displayed in search navigators
search.navigation.maxcount=100
# max number of items displayed in the dates navigator
search.navigation.dates.maxcount=640
# search result verification and snippet fetch caching rules
# each search result can be verified byloading the link from the web
# this can be enhanced using a cache. In some cases it may be appropriate
@@ -907,6 +910,11 @@ search.excludehosth=
# the cases of nocache, iffresh and ifexist causes an index deletion
search.verify.delete = true
# If enabled, the results are sorted in the browser using Javascript.
# This usually improves ranking accuracy, but doesn't work well for users
# who have Javascript disabled, are using screen readers, or are on slow computers.
search.jsresort = false
# remote search details
remotesearch.maxcount = 10
remotesearch.maxtime = 3000
@@ -52,6 +52,16 @@ <h2>Integration of a Search Portal</h2>
<input type="radio" name="search.options" value="false" #(search.options)#checked="checked"::#(/search.options)# />do not show Advanced Search
</dd>
<dt>Remote results resorting</dt>
<dd>
<label title="Remote results resorting can be triggered once the 'Refresh sorting' button (near the 'Search' button) becomes available.">
<input type="radio" name="search.jsresort" value="false" #(search.jsresort)#checked="checked"::#(/search.jsresort)# />On demand, server-side
</label>
<label title="This usually improves ranking accuracy, but doesn't work well for users who have Javascript disabled, are using screen readers, or are on slow computers.">
<input type="radio" name="search.jsresort" value="true" #(search.jsresort)#::checked="checked"#(/search.jsresort)# />Automated, with JavaScript in the browser <strong>for authenticated users only</strong>.
</label>
</dd>
<dt>Snippet Fetch Strategy &amp; Link Verification</dt>
<dd>
<img src="env/grafics/idea.png" width="32" height="32" alt="idea" align="center"/>Speed up search results with this option! (use CACHEONLY or FALSE to switch off verification)<br/>
@@ -40,6 +40,7 @@
import net.yacy.http.servlets.YaCyDefaultServlet;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.search.query.SearchEventCache;
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
import net.yacy.server.http.HTTPDFileHandler;
@@ -54,6 +55,8 @@ public static serverObjects respond(final RequestHeader header, final serverObje
/* Check this is a valid transaction */
TransactionManager.checkPostTransaction(header, post);
boolean cleanSearchCache = false;
if (post.containsKey("popup")) {
final String popup = post.get("popup", "status");
if ("front".equals(popup)) {
@@ -87,6 +90,12 @@ public static serverObjects respond(final RequestHeader header, final serverObje
sb.setConfig("publicTopmenu", !post.containsKey("publicTopmenu") || post.getBoolean("publicTopmenu"));
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, !post.containsKey(SwitchboardConstants.PUBLIC_SEARCHPAGE) || post.getBoolean(SwitchboardConstants.PUBLIC_SEARCHPAGE));
sb.setConfig("search.options", post.getBoolean("search.options"));
final boolean oldJsResort = sb.getConfigBool(SwitchboardConstants.SEARCH_JS_RESORT, SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT);
final boolean newJsResort = post.getBoolean(SwitchboardConstants.SEARCH_JS_RESORT);
/* When this setting has changed we must clean up the search event cache as it affects how search results are retrieved */
cleanSearchCache = oldJsResort != newJsResort;
sb.setConfig(SwitchboardConstants.SEARCH_JS_RESORT, newJsResort);
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, post.getBoolean(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
@@ -147,6 +156,14 @@ public static serverObjects respond(final RequestHeader header, final serverObje
sb.setConfig(SwitchboardConstants.PUBLIC_SEARCHPAGE, config.getProperty(SwitchboardConstants.PUBLIC_SEARCHPAGE,"true"));
sb.setConfig("search.navigation", config.getProperty("search.navigation","hosts,authors,namespace,topics"));
sb.setConfig("search.options", config.getProperty("search.options","true"));
final boolean oldJsResort = sb.getConfigBool(SwitchboardConstants.SEARCH_JS_RESORT, SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT);
final boolean newJsResort = Boolean.parseBoolean(config.getProperty(SwitchboardConstants.SEARCH_JS_RESORT, String.valueOf(SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT)));
/* When this setting has changed we must clean up the search event cache as it affects how search results are retrieved */
cleanSearchCache = oldJsResort != newJsResort;
sb.setConfig(SwitchboardConstants.SEARCH_JS_RESORT, newJsResort);
sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, config.getProperty(SwitchboardConstants.GREEDYLEARNING_ACTIVE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE));
sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE));
@@ -157,6 +174,10 @@ public static serverObjects respond(final RequestHeader header, final serverObje
sb.setConfig("search.excludehosts", config.getProperty("search.excludehosts",""));
sb.setConfig("search.excludehosth", config.getProperty("search.excludehosth",""));
}
if(cleanSearchCache) {
SearchEventCache.cleanupEvents(true);
}
}
/* Acquire a transaction token for the next POST form submission */
@@ -171,6 +192,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("publicTopmenu", sb.getConfigBool("publicTopmenu", false) ? 1 : 0);
prop.put(SwitchboardConstants.PUBLIC_SEARCHPAGE, sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, false) ? 1 : 0);
prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);
prop.put(SwitchboardConstants.SEARCH_JS_RESORT, sb.getConfigBool(SwitchboardConstants.SEARCH_JS_RESORT, SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_ACTIVE, sb.getConfigBool(SwitchboardConstants.GREEDYLEARNING_ACTIVE, false) ? 1 : 0);
prop.put(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, sb.getConfig(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, "0"));
Oops, something went wrong.

0 comments on commit 9f0e7dc

Please sign in to comment.