- fix to gsa searchresult answer in case that no query part is given

- fix to gsa default number of results (is 'num')
pull/1/head
Michael Peter Christen 12 years ago
parent 823ae4d6a7
commit 23fb458963

@ -13,7 +13,7 @@
<!--<li><a href="/yacysearch_location.html" class="MenuItemLink">Location Search</a></li>-->
<li><a href="/solr/select?q=*:*&defType=edismax&start=0&rows=3&core=collection1" class="MenuItemLink">Solr Default Core</a></li>
<li><a href="/solr/select?q=*:*&defType=edismax&start=0&rows=3&core=webgraph" class="MenuItemLink">Solr Webgraph Core</a></li>
<li><a href="/gsa/search?q=www&size=3" class="MenuItemLink">Google Appliance API</a></li>
<li><a href="/gsa/search?q=www&num=3" class="MenuItemLink">Google Appliance API</a></li>
<!--<li><a href="/yacy/ui/" accesskey="s" class="MenuItemLink">Rich Client Search</a></li>-->
<li><a href="/compare_yacy.html?display=1" class="MenuItemLink">Compare Search</a></li>
<li><a href="/ViewFile.html" class="MenuItemLink">URL Viewer</a></li>

@ -80,7 +80,7 @@ public class searchresult {
* @param out
* @return
*/
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env, final OutputStream out) {
public static serverObjects respond(final RequestHeader header, serverObjects post, final serverSwitch env, final OutputStream out) {
// this uses the methods in the jetty servlet environment and can be removed if jetty in implemented
Switchboard sb = (Switchboard) env;
@ -96,7 +96,7 @@ public class searchresult {
if (!searchAllowed) return null;
// check post
if (post == null) return null;
if (post == null) {post = new serverObjects(); post.put("q", ""); post.put("num", "0");}
Log.logInfo("GSA Query", post.toString());
sb.intermissionAllThreads(3000); // tell all threads to do nothing for a specific time

Loading…
Cancel
Save