fixes for embedded search / search widget

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6911 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 60e71876ad
commit 1610c81dff

@ -29,7 +29,7 @@
<h1>YaCy - Distributed Search Engine</h1> <h1>YaCy - Distributed Search Engine</h1>
<div id="yacylivesearch"> <div id="yacylivesearch">
<form id="ysearch" method="get" accept-charset="UTF-8" action="yacysearch.html"> <form id="ysearch" method="get" accept-charset="UTF-8" action="yacysearch.html">
<input name="search" id="yquery" class="fancy" type="text" size="20" maxlength="80" value=""/> <input name="query" id="yquery" class="fancy" type="text" size="20" maxlength="80" value=""/>
<input type="hidden" name="verify" value="true" /> <input type="hidden" name="verify" value="true" />
<input type="hidden" name="maximumRecords" value="20" /> <input type="hidden" name="maximumRecords" value="20" />
<input type="hidden" name="resource" value="local" /> <input type="hidden" name="resource" value="local" />

@ -21,6 +21,6 @@
<Query role="example" searchTerms="yacy+open+source" /> <Query role="example" searchTerms="yacy+open+source" />
<Tags>YaCy Open Source P2P Web Search</Tags> <Tags>YaCy Open Source P2P Web Search</Tags>
<Contact>See http://#[thisaddress]#/ViewProfile.html?hash=localhash</Contact> <Contact>See http://#[thisaddress]#/ViewProfile.html?hash=localhash</Contact>
<Attribution>YaCy Software &amp;copy; 2004-2008 by Michael Christen et al., YaCy.net; Content: ask peer owner</Attribution> <Attribution>YaCy Software &amp;copy; 2004-2010 by Michael Christen et al., YaCy.net; Content: ask peer owner</Attribution>
<SyndicationRight>open</SyndicationRight> <SyndicationRight>open</SyndicationRight>
</OpenSearchDescription> </OpenSearchDescription>

@ -15,8 +15,7 @@
$(document).ready(function() { $(document).ready(function() {
var height = document.documentElement.clientHeight - 240; var height = document.documentElement.clientHeight - 240;
var query = $.query.get('search'); var query = $.query.get('query');
if (query == '') query = $.query.get('query');
$(".yresult").flexigrid({ $(".yresult").flexigrid({
url: '/yacysearch.json', url: '/yacysearch.json',

@ -95,7 +95,7 @@ public class yacysearch {
final String client = header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP); // the search client who initiated the search final String client = header.get(HeaderFramework.CONNECTION_PROP_CLIENTIP); // the search client who initiated the search
// get query // get query
String originalquerystring = (post == null) ? "" : post.get("query", "").trim(); String originalquerystring = (post == null) ? "" : post.get("query", post.get("search", "")).trim();
String querystring = originalquerystring.replace('+', ' '); String querystring = originalquerystring.replace('+', ' ');
boolean fetchSnippets = (post != null && post.get("verify", "false").equals("true")); boolean fetchSnippets = (post != null && post.get("verify", "false").equals("true"));
final serverObjects prop = new serverObjects(); final serverObjects prop = new serverObjects();

Loading…
Cancel
Save